Gem Dependencies
# In config/environment.rb
Rails::Initializer.run do |config|
config.gem “RedCloth”, :version => “>= 3.0.4″
end
# One more thing we need to add; RedCloth is not found in the gem repository.
config.gem “RedCloth”, :version => “>=3.0.4″, :source=>”http://code.whytheluckystiff.net/”
# rake tasks
jruby -S rake gems # lists gem dependencies of project
jruby -S rake gems:install # installs gems required by project
jruby -S rake gems:unpack # include gems in rails project
jruby -S rake gems:build # native extension code
# If you run across a gem that requires a different name than the gem file…
config.gem ‘aws-s3′, :lib => ‘aws/s3′
# Sometimes you want to require gems in certain environments/test.rb
config.gem ‘mocha’
config.gem ‘Shoulda’
jruby -S rake gems RAILS_ENV=’test’

Leave a Reply