Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

It's dead Jim - deploying Ruby/Rails to Heroku

Hey everyone,

I have been trying desperately for about 4 hours to deploy an app to Heroku. It is in Ruby on Rails and that means its default is sqlite3. I took a summer bootcamp, and every app we have made is in that format.

Treehouse says it's as simple as changing a couple of lines in the gemfile. Heroku docs say it's as simple as installing pg.

I can't get pg installed. I can't get the Treehouse way to work. I can't get the Treehouse way to work with this format gem 'debugger', group: [:development, :test] instead of this format group :production do gem 'pg', '0.15.1' gem 'rails_12factor', '0.0.2' gem 'rmagick', '2.13.2' end

I checked stackoverflow and I've tried installing sqlite3. I've tried uninstalling versions of sqlite3. I've tried installing without production.

I can't get the app online. Period.

How do I do this folks?

Summary of what I need to do: get rid of sqlite3 to get a Ruby on Rails app onto Heroku. Why is this so damn difficult?

8 Answers

Dave Faliskie
Dave Faliskie
17,793 Points

I know its been a year but did you ever deploy your app? I'm having a lot of similar issues, any help would be awesome!

Hey,

While, I would need to see your code to get it really deployed and see the errors, I would highly recommend for you to use cloud66. It is more visual than Heroku is and will tell you the errors. It will also transform automatically the database. I have nothing but good experiences with Cloud66 (and not getting paid by them)

Niels

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

Thanks Niels. I'll look into it.

Here's an example of an app we were building in class this summer: https://github.com/summerspirit/tweeder I haven't updated this one yet to try and push it.

Here's the example I was fighting with last night: https://github.com/summerspirit/lovely-flickr It has been updated to reflect the changes so far. Somehow the changes made it deploy on Heroku, but I'm not sure which changes particularly. I scoured the internet for answers and did a lot of things with it. I have no idea what the "secret sauce" was that finally made it deploy. Currently this is what it's doing on Heroku: http://intense-reaches-1132.herokuapp.com/ I've tried the Treehouse suggestion (to heroku run rake:db migrate) and I've tried ensuring it's on cedar.

Just headed out to pay bills and things at the moment, but I will definitely look into working with Cloud66.

Thanks again for some direction.

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

It's definitely a lot faster to figure out what's broken. Thanks!

It's not deployed. I still have sqlite in one environment, and it seems to have deployed on Heroku (give or take not being able to see my app).

Take care.

If anyone else has suggestions for deploying (on Heroku or Cloud66), let me know.

Thanks!

Seems like you deploy like me in the beginning....just brute force ;)

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

Haha yeah, but I want to learn to do better. I can't say it's successful if you can't see it AND I can't recreate getting an app up lol I have a couple of independent projects I was working on this summer I want to deploy, but I figured if I was going to break anything, it might as well be some of the sample things we were working on in class first.

It feels like Rails has so many upgrades and versions that it's impossible to follow tutorials or online advice more than a month old.

That is also the feeling I have, but I think it is more about getting away from the Tutorials that is keeping me in Treehouse. I think that it is difficult to make the next step and not rely on the tutorials anymore

Naomi Freeman
STAFF
Naomi Freeman
Treehouse Guest Teacher

Haha I did get deployed. There were a few challenges, and in the end, something even funnier turned up. Currently cooking a Christmas chicken, but I'll try and respond by the end of the week :)