ruby-on-railsmacoshobo

Hobo cannot find Rails


I am trying to create a web site using Hobo. I've installed Ruby, Rails and Hobo, in that order. However, when I run hobo to create a new site, it says it can't find rails even though I just installed it.

Note that it says, "Could not find rails amongst [some list of things]", where [some list of things] actually contains a version of rails!

/Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find rails (~> 3.0.0) amongst
[abstract-1.0.0, actionmailer-3.2.6, actionmailer-3.0.15, actionpack-3.2.6, actionpack-3.0.15, activemodel-3.2.6, activemodel-3.0.15, activerecord-3.2.6, activerecord-3.0.15, activeresource-3.2.6, activeresource-3.0.15, activesupport-3.2.6, activesupport-3.0.15, arel-3.0.2, arel-2.0.10, builder-3.0.0, builder-2.1.2, bundler-1.1.4, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.3.3, dryml-1.3.0, erubis-2.7.0, erubis-2.6.6, execjs-1.4.0, hike-1.2.1, hobo-1.3.0, hobo_fields-1.3.0, hobo_support-1.3.0, i18n-0.6.0, i18n-0.5.0, journey-1.0.4, jquery-rails-2.0.2, json-1.7.3, mail-2.4.4, mail-2.2.19, mime-types-1.19, multi_json-1.3.6, polyglot-0.3.3, rack-1.4.1, rack-1.2.5, rack-cache-1.2, rack-mount-0.6.14, rack-ssl-1.3.2, rack-test-0.6.1, rack-test-0.5.7, rails-3.2.6, railties-3.2.6, railties-3.0.15, rake-0.9.2.2, rdoc-3.12, rubygems-update-1.8.24, sass-3.1.19, sass-rails-3.2.5, sprockets-2.4.3, sprockets-2.1.3, sqlite3-1.3.6, thor-0.15.3, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.33, uglifier-1.2.5, will_paginate-3.0.3] (Gem::LoadError)
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:777:in `activate_dependencies'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `each'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `activate_dependencies'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:750:in `activate'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:780:in `activate_dependencies'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `each'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:766:in `activate_dependencies'
        from /Library/Ruby/Site/1.8/rubygems/specification.rb:750:in `activate'
        from /Library/Ruby/Site/1.8/rubygems.rb:1232:in `gem'
        from /usr/bin/hobo:22

Here are some more details about my environment: I'm on Mac OS X 10.7.4, with the following versions of Ruby, Rails, and RubyGems:

$ rails --version

Rails 3.2.6

$ ruby -v

ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.4.0]

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-11
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/blake/.gem/ruby/1.8
     - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Solution

  • You have installed rails-3.2.6, which does not match the version in the error message: rails (~> 3.0.0).

    ~> 3.0.0 means "anything greater than or equal to 3.0.0 but less than 3.1;" so, any 3.0.x version in this case. You can install a specific version with

    [sudo] gem install rails -v version
    

    (where version is the version number you want).