rails installation fails

santhosh's Avatar

santhosh

09 Jun, 2011 11:41 AM

I have installed sproutcore and along with it comes ruby 1.9.2 p-180 and gem 1.7.2 . So i tried to install rails with this
gem install rails --version 3.0.7

i get the following error.

ERROR: While executing gem ... (Gem::DependencyError)

Unable to resolve dependencies: rails requires actionmailer (= 3.0.7), railties (= 3.0.7), bundler (~> 1.0); activeresource requires activemodel (= 3.0.7);

activerecord requires activemodel (= 3.0.7), arel (~> 2.0.2), tzinfo (~> 0.3.23)
; actionpack requires activemodel (= 3.0.7), builder (~> 2.1.2), i18n (~> 0.5.0) , rack (~> 1.2.1), rack-test (~> 0.5.7), rack-mount (~> 0.6.14), tzinfo (~> 0.3. 23), erubis (~> 2.6.6)

Can some one pls help me to resolve this issue.

  1. Support Staff 2 Posted by Nick Quaranto on 12 Jun, 2011 05:05 PM

    Nick Quaranto's Avatar

    What RubyGems version, and what OS? If you could give us the output of gem env that would be awesome.

  2. 3 Posted by rwallace_88 on 14 Jun, 2011 01:12 PM

    rwallace_88's Avatar

    Hi I'm getting a simliar problem:
    D:\GE\Installs\Ruby>gem install rails
    ERROR: While executing gem ... (Gem::DependencyError)

    Unable to resolve dependencies: rails requires activesupport (= 2.2.3), activerecord (= 2.2.3), actionpack (= 2.2.3), actionmailer (= 2.2.3), activeresource
    

    (= 2.2.3)

    D:\GE\Installs\Ruby>gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.5 - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32] - INSTALLATION DIRECTORY: D:/Ruby192/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: D:/Ruby192/bin/ruby.exe - EXECUTABLE DIRECTORY: D:/Ruby192/bin - RUBYGEMS PLATFORMS:

    - ruby
    - x86-mingw32
    
    • GEM PATHS:
      • D:/Ruby192/lib/ruby/gems/1.9.1
      • L:/.gem/ruby/1.9.1
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
    • REMOTE SOURCES:
  3. 4 Posted by rwallace_88 on 14 Jun, 2011 01:23 PM

    rwallace_88's Avatar

    Additonal information:
    OS Name: Microsoft Windows 7 Professional
    OS Version: 6.1.7600 N/A Build 7600
    rails-2.2.3.gem rubygems-1.8.5
    Thanks

  4. Support Staff 5 Posted by Luis Lavena on 19 Jun, 2011 04:10 PM

    Luis Lavena's Avatar

    Hello,

    Sorry for the delay on the answer. Seems to me that you're having issues retrieving the list of gems from rubygems.org

    Can you please perform:

    • gem sources -c
    • gem list rails and see it is not installed.

    Now, please execute the following command: gem install rails --debug -V, please create a pastie or gist with the complete output and update this ticket with the link for us to look at.

    Thank you.

  5. 6 Posted by David on 26 Jan, 2012 12:37 PM

    David's Avatar

    Hi, i´ve the same problem...

    I did what u said it before and that´s te output that i have:

    C:\Ruby187\bin>gem install rails --debug -V
    Exception NameError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_mana ger.rb:177 - uninitialized constant Gem::Commands::InstallCommand ExceptionGem::LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/depende
    ncy.rb:247 - Could not find psych (>= 1.2.1, ~> 1.2) amongst []
    Exception LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_requi re.rb:36 - no such file to load -- psych ExceptionLoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_requi
    re.rb:62 - no such file to load -- psych
    Exception IOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 - closed stream ExceptionIOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 -
    closed stream Exception Errno::EHOSTUNREACH' at C:/Ruby187/lib/ruby/1.8/net/http.rb:560 - A s ocket operation was attempted to an unreachable host. - connect(2) ExceptionGem::RemoteFetcher::FetchError' at C:/Ruby187/lib/ruby/site_ruby/1.8/
    rubygems/remote_fetcher.rb:239 - Errno::EHOSTUNREACH: A socket operation was att
    empted to an unreachable host. - connect(2) (http://rubygems.org/specs.4.8.gz)
    Error fetching remote data: Errno::EHOSTUNREACH: A socket operation
    was attempted to an unreachable host. - connect(2) (http://rubygems.org/specs.4.
    8.gz)
    Falling back to local-only install
    Exception IOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 - closed stream ExceptionIOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 -
    closed stream Exception IOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 - closed stream ExceptionIOError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 -
    closed stream Exception `Gem::DependencyError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/d
    ependency_installer.rb:153 - Unable to resolve dependencies: actionmailer requir
    es mail (~> 2.4.0); actionpack requires activemodel (= 3.2.0), rack-cache (~> 1.
    1), builder (~> 3.0.0), rack (~> 1.4.0), rack-test (~> 0.6.1), journey (~> 1.0.0
    ), sprockets (~> 2.1.2), erubis (~> 2.7.0); activesupport requires i18n (~> 0.6) , multi_json (~> 1.0); rails requires activerecord (= 3.2.0), activeresource (= 3.2.0), railties (= 3.2.0), bunERROR: While executing gem ... (Gem::DependencyE
    rror)

    Unable to resolve dependencies: actionmailer requires mail (~> 2.4.0); actio
    

    npack requires activemodel (= 3.2.0), rack-cache (~> 1.1), builder (~> 3.0.0), r
    ack (~> 1.4.0), rack-test (~> 0.6.1), journey (~> 1.0.0), sprockets (~> 2.1.2),
    erubis (~> 2.7.0); activesupport requires i18n (~> 0.6), multi_json (~> 1.0); ra
    ils requires activerecord (= 3.2.0), activeresource (= 3.2.0), railties (= 3.2.0
    ), bundler (~> 1.0)

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:153:i
    

    n `gather_dependencies'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:267:i
    

    n `install'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:1
    

    21:in `execute'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:1
    

    15:in `each'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:1
    

    15:in `execute'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:147:in `pr
    

    ocess_args'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:117:in `ru
    

    n'

        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:65:in `run'
        C:/Ruby187/bin/gem:21
    
  6. 7 Posted by yuexia12 on 22 Apr, 2012 03:51 AM

    yuexia12's Avatar

    I met the same problem, enclosed is output when I execute "gem install rails --debug -V"

  7. Support Staff 8 Posted by Luis Lavena on 03 May, 2012 11:04 PM

    Luis Lavena's Avatar

    @yuexia12

    Seems that RubyGems is having problems looking up for the servers.

    What are the list of remote sources when run gem env at the command prompt?

  8. 9 Posted by siteations on 01 Mar, 2013 12:05 PM

    siteations's Avatar

    This comment was split into a new discussion: rails installation fails

    Hi, I've been trying all week with various levels of failure and have tried anything I could find to get connected to rubygems.org. Any assistance would be appreciated. My details are pasted below:

    No Proxy Info:

    C:\DevKit>gem install rspec --no-ri --no-rdoc
    ERROR: Could not find a valid gem 'rspec' (>= 0), here is why:
    Unable to download data from http://rubygems.org/ - no such name (http://rubygems.org/latest_specs.4.8.gz)

    With Proxy Info:

    C:\DevKit>gem install rspec --no-ri --no-rdoc --http-proxy=http://XXXXXXX:XXXXXXX@proxy:8083
    ERROR: Could not find a valid gem 'rspec' (>= 0), here is why:
    Unable to download data from http://rubygems.org/ - server did not return a valid file (http://rubygems.org/latestspecs.4.8.gz)

    C:\Ruby200>gem install rails --debug -v
    Exception OptionParser::MissingArgument' at C:/Ruby200/lib/ruby/2.0.0/optparse.rb:496 - missing argument: ExceptionOptionParser::MissingArgument' at C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1398 - missing argument: -v
    ERROR: While executing gem ... (OptionParser::MissingArgument)
    missing argument: -v C:/Ruby200/lib/ruby/2.0.0/optparse.rb:496:in parse' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1392:inblock in parse_in_order' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1351:in catch' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1351:inparse_in_order' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1345:in order!' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1437:inpermute!' C:/Ruby200/lib/ruby/2.0.0/optparse.rb:1459:in parse!' C:/Ruby200/lib/ruby/2.0.0/rubygems/command.rb:375:inhandle_options' C:/Ruby200/lib/ruby/2.0.0/rubygems/command.rb:296:in invoke_with_build_args' C:/Ruby200/lib/ruby/2.0.0/rubygems/command_manager.rb:170:inprocess_args' C:/Ruby200/lib/ruby/2.0.0/rubygems/command_manager.rb:130:in run' C:/Ruby200/lib/ruby/2.0.0/rubygems/gem_runner.rb:60:inrun' C:/Ruby200/bin/gem:21:in `'

    C:\Ruby200>gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 2.0.0 - RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [i386-mingw32] - INSTALLATION DIRECTORY: C:/Ruby200/lib/ruby/gems/2.0.0 - RUBY EXECUTABLE: C:/Ruby200/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby200/bin - RUBYGEMS PLATFORMS: - ruby - x86-mingw32 - GEM PATHS: - C:/Ruby200/lib/ruby/gems/2.0.0 - C:/Users/c5034745/.gem/ruby/2.0.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/

  9. Support Staff 10 Posted by Nick Quaranto on 08 May, 2013 12:44 AM

    Nick Quaranto's Avatar

    Is this still happening?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.