hibiken / stories

Medium clone built with Ruby on Rails
https://my-medium-clone.herokuapp.com/
MIT License
826 stars 270 forks source link

Rebranding App #49

Open JustK2 opened 7 years ago

JustK2 commented 7 years ago

This is probably a super basic question - but I am having some trouble rebranding the app (changing the Stories image and placeholder text even...I am sure that there is some dependencies that I am missing. This is my first ruby/heroku app...can anyone provide guidance. I would be so grateful. Help. :)

AjayBarot commented 7 years ago

@JustK2 : Let me know where you stuck. may be I can help you. Please follow this steps to upload basic rails application on heroku. https://devcenter.heroku.com/articles/getting-started-with-rails4

JustK2 commented 7 years ago

Thank you @AjayBarot! The app is up and running here: https://still-cliffs-31192.herokuapp.com/ all I am trying to do now is swap out the "Stories" branding so the images and the placeholder texts. And nothing I do seems to change the placeholder text (even though it's changed in the html, css, js files) or the image ( I did manage to break the image though, haha). Any insights would be amazing! Thank you for the reply!

screen shot 2017-04-17 at 11 12 32 am
AjayBarot commented 7 years ago

@JustK2 : 1 Point: Stories is a logo image file stories-logo.svg. Basically heroku will not allow to save files\attachments locally on the server. You can save to the tmp folder, BUT it is not guaranteed to stay there. In order to upload files you should use some external storage like Amazon S3 for example.

Ref: http://stackoverflow.com/questions/24642967/can-i-host-images-in-heroku-or-do-i-need-s3

2: You can find "Search Stories" placeholder code at stories/app/assets/javascripts/components/search_bar.es6.jsx:18 (line no 18)you can change this placeholder.

JustK2 commented 7 years ago

Ahhh, ok. I was wondering why you need AWS. That's great info thank you!

JustK2 commented 7 years ago

Hey @AjayBarot - thanks again for the info - I had a chance to review it more thoroughly and need a quick clarification on the link that you provided: http://stackoverflow.com/questions/24642967/can-i-host-images-in-heroku-or-do-i-need-s3 it seems like you can use the assets pipeline in Rails...which is what I was trying. These are just the brand logos, they'll never change. Is the AWS S3 bucket still necessary? It doesn't seem so. If not, any ideas on why the assets pipeline is not working as expected? Thanks again!

anthonybrown commented 7 years ago

Shouldn't you use S3 for storage? I thought it was a no-no to store images in Heroku?

JustK2 commented 7 years ago

That's only for images that you upload or frequently changed images...for static images like the logo you can use the Rails Asset Path. My error was that I had to basically set a variable in the production.rb to recompile at build so that it picks up new images...still can't get the placeholder text to change though, super frustrating. You are right about the location, the change just doesn't propagate. Any thoughts on that? Thanks!

On Sat, Jun 3, 2017 at 4:07 AM, Tony Brown notifications@github.com wrote:

Shouldn't you use S3 for storage? I thought it was a no-no to store images in Heroku?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kenny-hibino/stories/issues/49#issuecomment-305968186, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFsrAMjxb-Aoir0NE9i2ukLgQXf1gErks5sAT5zgaJpZM4M-0nx .