Rake gems:install requires the gems it tries to install

Hi,

I’m having a problem with rake gems:install on ubuntu hardy with
rubygems 1.2 installed from source.

I have the following gem requirements in my environment.rb:

Required GEMs

config.gem ‘crypt’, :version => ‘1.1.4’, :lib => ‘crypt/blowfish’
config.gem ‘hpricot’, :version => ‘0.6.161’
config.gem ‘json’, :version => ‘1.1.3’
config.gem ‘rexml-expansion-fix’

I I try to run rake gems:install, I get exceptions that those gems could
not be required. Which is of course true because they are not yet
installed, but that’s what rake gems:install is for, right?

Any Idea?

root@octopotapitest:/var/www/octopot/releases/20080825165500# rake
gems:install
(in /var/www/octopot/releases/20080825165500)
no such file to load – crypt/blowfish
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
__send__' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:246:in
each' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/initializer.rb:246:inload_gems’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:137:in
process' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/initializer.rb:93:insend’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:93:in
run' /var/www/octopot/releases/20080825165500/config/environment.rb:13 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
/var/www/octopot/releases/20080825165500/vendor/rails/railties/lib/tasks/gems.rake:15
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:ininvoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:insend’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:ininvoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:inload’
/usr/bin/rake:19
no such file to load – crypt/blowfish
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:innew_constants_in’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:in
require' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:57:inload’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in
__send__' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:into_proc’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:246:in
each' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/initializer.rb:246:inload_gems’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:142:in
process' /var/www/octopot/releases/20080825165500/config/../vendor/rails/railties/lib/initializer.rb:93:insend’
/var/www/octopot/releases/20080825165500/config/…/vendor/rails/railties/lib/initializer.rb:93:in
run' /var/www/octopot/releases/20080825165500/config/environment.rb:13 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in require' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:354:in
new_constants_in' /var/www/octopot/releases/20080825165500/vendor/rails/activesupport/lib/active_support/dependencies.rb:509:inrequire’
/var/www/octopot/releases/20080825165500/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
/var/www/octopot/releases/20080825165500/vendor/rails/railties/lib/tasks/gems.rake:15
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:inexecute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:ininvoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:insend’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:ininvoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:insynchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:intop_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31 /usr/bin/rake:19:inload’
/usr/bin/rake:19
rake aborted!
no such file to load – json/pure

(See full trace by running task with --trace)

Best regards, Philipp S.

I’m having the same problem. Here is the list of my gems:
config.gem “faker”, :version => ‘0.2.0’
config.gem “ar-extensions”, :version => ‘0.8.0’
config.gem “hobofields”, :version => ‘0.7.5’
config.gem “hobosupport”, :version => ‘0.7.5’
config.gem “capistrano”, :version => ‘2.4.3’
config.gem “capistrano-ext”, :version => ‘1.2.1’

All of them are installed, but I get a no such file to load on the
capistrano-ext. If I remove that one the rest work fine.

When I do rake gems, after the no such file to load and the stack dump
(twice) it then shows this:
[I] faker = 0.2.0
[I] ar-extensions = 0.8.0
[I] hobofields = 0.7.5
[I] hobosupport = 0.7.5
[I] capistrano = 2.4.3
[ ] capistrano-ext = 1.2.1

Brian

On Aug 25, 1:13 pm, Philipp S. [email protected]

I’m having exactly the same problem. My list of gems is even smaller:

config.gem ‘twitter4r’

When I run “rake gems” I get the stack dump. I’m getting this in a
bare-bones project I created to verify that I could recreate the
problem. Thinking it might be a versioning issue with gems or rails, I
removed Rails, Rubygems, Ruby, and anything else that looked related
and did a complete reinstall. I’m on Ubuntu.

If I run “rails -v” it says “Rails 2.1.0”. If I run “gem env”, I get
the following:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.2.0
  • RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
  • INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: /usr/bin/ruby1.8
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-linux
  • GEM PATHS:
    • /usr/lib/ruby/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

To my eyes, these both look good.

Any ideas anyone?

Regards-
Eric

bburidg-

Give this a try:

config.gem “capistrano-ext”, :version => ‘1.2.1’, :lib => ‘capistrano’

-Eric

Maybe victory!! (I don’t want to anger the development gods with
premature rejoicing)

If I change the line:

config.gem ‘twitter4r’

to

config.gem ‘twitter4r’, :lib => “twitter”

then it works.

-EricM

I am having the same issues on Ubuntu 8.0.4. Using rails 2.1.1 and gems
1.2.0.
When I run sudo rake gems:install I get the no such file to load.

I noticed when I tried to just use the capistrano line above. I
received an error about packet. Which is not installed on my server and
is also required by the application.

Eric M. wrote:

bburidg-

Give this a try:

config.gem “capistrano-ext”, :version => ‘1.2.1’, :lib => ‘capistrano’

-Eric

Hey,

The trick for me to get it working was when I removed gem that was
installed locally (using sudo gem install) and then installed it through
my rails application using rake gems:install and then I was able to
unpack it as well.

Hope it helps.

G.

Yep that worked. Thanks Eric!

Brian

On Aug 27, 10:00 pm, emarthinsen [email protected]