halogenandtoast / alchemist

A scientific conversion library.
155 stars 28 forks source link

Production configuration undefined method #11

Closed paniwani closed 11 years ago

paniwani commented 12 years ago

I'm having a problem with Rails recognizing Alchemist in production on my linode. In development locally everything works smoothly. Even in production locally it works great. I've detailed the problem on Stack Overflow here:

I'm on ruby 1.9.2 and rails 3.2.2

http://stackoverflow.com/questions/10852936/ruby-conversion-gem-errors-with-production-on-rails

halogenandtoast commented 12 years ago

This sounds like there is something wrong with your deployment process. Can you ssh into linode and run a console from there and try: require 'alchemist' my guess is that bundling isn't working correctly.

paniwani commented 12 years ago

deployer@li60-239:~/apps/saute/current$ irb irb(main):001:0> require 'alchemist' => true irb(main):002:0> 1.cup => 1.0 irb(main):003:0> exit deployer@li60-239:~/apps/saute/current$ bundle exec rails c production Loading production environment (Rails 3.2.5) irb(main):001:0> 1.cup => 1.0 irb(main):002:0> 1.cup.class => Alchemist::NumericConversion

As you can see, it works totally fine on the linode both in irb and the production rails console.

But it doesn't seem to able to find Alchemist from within my model specifically when in production on the linode.

halogenandtoast commented 11 years ago

I'll assume you've moved on or figured out your issue. If you remember if or how you solved it can you respond back here?