Hi Ryan,
Is it still the norm to change environment.rb or should we be doing this in the initializers?
Cheers,
Aditya
Minor thing: you can do RAILS_ENV=test instead of RAILS_ENV='test'.
@Aditya, anything that uses "config" I like to keep in the environment.rb. Anything that doesn't (where you can specify it after the config) then move that into an initializer.
@Henrik, yeah, my quote finger was a little twitchy last night it seems. ;)
Another great rails cast!
Could you do some on ActionMailer?
@Andrew - ActionMailer is good described in Agile Webdevelopment.
Ryan, as always great videos. Loved the 2.1 updates. I've recently been using config.gem and I think I found a problem using it with BlueCloth: http://railsforum.com/viewtopic.php?id=18850
Any idea whats going on here?
Thanks for another great screencast. I just came across a gem's instructions to use:
:version => '~> 2.3.2'
What does ~> mean?
Nevermind, there was an explanation:
gem 'mislav-will_paginate', '~>2.1'
# this will load any 2.x version
#(greater or equal to 2.1),
# but not 3.x
I am currently using mislav-will_paginate gem.
When I give it in environment.rb, it shows me 'mislav-will_paginate' file not found. I have given the proper version and source. Still it shows me the same error. How can I get rid of this error?
I'd love to see how to make a gem plugin, similar to how you made a normal plugin in episode 33!
@madan, I had the same problem with a number of gems. It happens when the library module you're going to use is named differently from the gem. For example if you say
config.gem 'chardet'
=> rake can install the gem, but not unpack it, and rails gives the error
no such file to load -- chardet
and script/about gives the error
These gems that this application depends on are missing:
- chardet
To avoid this, you have to specify the name of the module:
config.gem 'chardet', :lib=>'UniversalDetector'
config.gem "mislav-will_paginate", :lib => "will_paginate"
see http://rails.lighthouseapp.com/projects/8994/tickets/293-gem-dependencies-broken-in-2-1-0



