hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
724 stars 215 forks source link

Ruby 2.0.0 doesn't work (Was: Cannot spin up new node on Heroku) #772

Closed mathias closed 9 years ago

mathias commented 10 years ago

Hey folks.

I'm trying to DIY my way through spinning up a new node on Heroku, since the docs haven't been written yet (#475).

This is the error I'm seeing in the Heroku logs when I attempt to hit the homepage:

Processing by StaticController#homepage as HTML
NoMethodError (undefined method `empty?' for nil:NilClass):

Completed 500 Internal Server Error in 33ms

(with timestamp data stripped off those lines for clarity) Note that there are not line numbers in this output.

The empty? that might be called from the homepage is in https://github.com/hotsh/rstat.us/blob/master/app/views/updates/_list.html.haml#L52 But putting a nil check around updates there does not make this go away.

I tried to reproduce the bug by pointing my local rails server at the production MongoHQ database & setting other ENV variables to emulate production (RAILS_ENV=production etc) but I was not able to reproduce the empty? error.

Help?

carols10cents commented 10 years ago

Oh fun times. I had the same issue you did, so in trying to isolate the differences I added

ruby '1.9.3'

to the Gemfile to tell heroku to use 1.9.3 since 2.0.0 is now the default heroku uses for new apps-- and I have a new node going on heroku now.

So I'm guessing you're running 1.9.3 locally?

I'm going to push that change to the gemfile and change this issue to be about ruby 2.0.0 compatibility.... bleh.

mathias commented 10 years ago

that worked. thanks @carols10cents ! :cake: