You may be able to reproduce this locally by starting your app with RAILS_ENV=production
$ env RAILS_ENV=production rails server On Sunday, January 22, 2012 at 4:24 PM, Michael Baldock wrote: > Hi, > > I'm trying to do something I think should be simple, and works fine on > my local machine, but crashes on heroku, I was hoping someone could > shed some light, as I'm totally baffled. > > I have a class called ScrapersController, with a standard set of views > and a model. In the same folder I have another class called > ScraperManager, that I use with delayed_job to go off and scrape > websites in the background. > > I create an instance of ScraperManager with > > @scraper_manager = ScraperManager.new > > I didn't think twice about writing this line, it works fine on my > local server, but on heroku it crashes. > > The error message I get sent is: > > /////////////// > Admin::Events is not missing constant ScraperManager! > .bundle/gems/ruby/1.8/gems/activesupport-3.0.3/lib/active_support/ > dependencies.rb:479:in `load_missing_constant' > /////////////// > > The folder is within Admin::Events. if it's NOT missing constant, why > is it breaking?? > > I've tried various ways of including the ScraperManager in the > ScraperController class, but cant work out how to do this > > require 'ScraperManager' - doesn't work > include Admin::Events::ScraperManager - doesn't work > > In most other languages it's easy to include a header file, but > apparently not in ruby! > > I've made an effort recently to try and emulate the heroku platform as > much as possible locally, precisely to avoid these inconsistencies, so > I'm using rvm to run ree-1.8.7 locally, which is the same as the stack > my app's on. > > I'm helping with this rails app up on heroku as a part-time / favour, > and every time I come back to the app after a couple of months , > things have started to fall apart! I don't know what it is about > ruby / rails, but nothing ever stays working for long!! > (sorry, frustrated rant over) > > Any help would be appreciated :-) > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to [email protected] > (mailto:[email protected]). > To unsubscribe from this group, send email to > [email protected] > (mailto:[email protected]). > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
