Unable to upload images to Google Cloud Platform through my app
So I created an app on my local machine that allows me to upload images to Google Cloud Platform. When I use the app on my local machine, I'm able to upload to the cloud. However, when I uploaded it to Heroku, I get a “We’re sorry, but something went wrong” when I try to upload images. When I ran the logs, I got "ActionView::Template::Error (Nil location provided. Can't build URI.):" How do I fix this?
I'm working on a portfolio and want to show off what I can do. Here's my github repository: https://github.com/isepulveda78/yelpdemo
ruby-on-rails heroku google-cloud-platform
add a comment |
So I created an app on my local machine that allows me to upload images to Google Cloud Platform. When I use the app on my local machine, I'm able to upload to the cloud. However, when I uploaded it to Heroku, I get a “We’re sorry, but something went wrong” when I try to upload images. When I ran the logs, I got "ActionView::Template::Error (Nil location provided. Can't build URI.):" How do I fix this?
I'm working on a portfolio and want to show off what I can do. Here's my github repository: https://github.com/isepulveda78/yelpdemo
ruby-on-rails heroku google-cloud-platform
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31
add a comment |
So I created an app on my local machine that allows me to upload images to Google Cloud Platform. When I use the app on my local machine, I'm able to upload to the cloud. However, when I uploaded it to Heroku, I get a “We’re sorry, but something went wrong” when I try to upload images. When I ran the logs, I got "ActionView::Template::Error (Nil location provided. Can't build URI.):" How do I fix this?
I'm working on a portfolio and want to show off what I can do. Here's my github repository: https://github.com/isepulveda78/yelpdemo
ruby-on-rails heroku google-cloud-platform
So I created an app on my local machine that allows me to upload images to Google Cloud Platform. When I use the app on my local machine, I'm able to upload to the cloud. However, when I uploaded it to Heroku, I get a “We’re sorry, but something went wrong” when I try to upload images. When I ran the logs, I got "ActionView::Template::Error (Nil location provided. Can't build URI.):" How do I fix this?
I'm working on a portfolio and want to show off what I can do. Here's my github repository: https://github.com/isepulveda78/yelpdemo
ruby-on-rails heroku google-cloud-platform
ruby-on-rails heroku google-cloud-platform
asked Dec 28 '18 at 16:22
Israel SepulvedaIsrael Sepulveda
62
62
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31
add a comment |
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31
add a comment |
1 Answer
1
active
oldest
votes
Change line 42 in config/environments/production.rb
config.active_storage.service = :local
with
config.active_storage.service = :google
For more information : Setup Active Storage
EDIT :
After watching your github your images do not go into google cloud even local.
You have checked in your google console if you find your images ?
Follow these different tutorials for the use of active storage and google cloud.
Active_storage
Google Cloud Storage account
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961395%2funable-to-upload-images-to-google-cloud-platform-through-my-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Change line 42 in config/environments/production.rb
config.active_storage.service = :local
with
config.active_storage.service = :google
For more information : Setup Active Storage
EDIT :
After watching your github your images do not go into google cloud even local.
You have checked in your google console if you find your images ?
Follow these different tutorials for the use of active storage and google cloud.
Active_storage
Google Cloud Storage account
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
add a comment |
Change line 42 in config/environments/production.rb
config.active_storage.service = :local
with
config.active_storage.service = :google
For more information : Setup Active Storage
EDIT :
After watching your github your images do not go into google cloud even local.
You have checked in your google console if you find your images ?
Follow these different tutorials for the use of active storage and google cloud.
Active_storage
Google Cloud Storage account
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
add a comment |
Change line 42 in config/environments/production.rb
config.active_storage.service = :local
with
config.active_storage.service = :google
For more information : Setup Active Storage
EDIT :
After watching your github your images do not go into google cloud even local.
You have checked in your google console if you find your images ?
Follow these different tutorials for the use of active storage and google cloud.
Active_storage
Google Cloud Storage account
Change line 42 in config/environments/production.rb
config.active_storage.service = :local
with
config.active_storage.service = :google
For more information : Setup Active Storage
EDIT :
After watching your github your images do not go into google cloud even local.
You have checked in your google console if you find your images ?
Follow these different tutorials for the use of active storage and google cloud.
Active_storage
Google Cloud Storage account
edited Dec 28 '18 at 22:33
answered Dec 28 '18 at 22:23
Clyde TClyde T
769
769
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
add a comment |
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
I will try that first thing tomorrow. They do upload in my local environment but not on Heroku.
– Israel Sepulveda
Dec 29 '18 at 3:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961395%2funable-to-upload-images-to-google-cloud-platform-through-my-app%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I edited my answer
– Clyde T
Dec 28 '18 at 22:37
I changed that. I actually had that in the beginning, but I changed it back to local since it wasn't working on Heroku but on my local machine. I got it to work after I uninstalled a couple of gems. According to a post on STF, the fog-google gem is out-of-date. When I took that off and used active storage, it worked perfectly.
– Israel Sepulveda
Dec 29 '18 at 18:31