Installation Error

91 views
Skip to first unread message

Aravind Thiru

unread,
Jul 7, 2015, 10:05:07 AM7/7/15
to rubyonra...@googlegroups.com
ruby setup.rb when i type this i am getting a error
$ ruby setup.rb
/usr/lib/ruby/2.2.0/rubygems.rb:8:in require': cannot load such file --
rbconfig (LoadError)
from /usr/lib/ruby/2.2.0/rubygems.rb:8:in< top (required) >'
from < internal:gem_prelude >:1:in require'
from <internal:gem_prelude>:1:in< compiled > '

I am completely new to it. Somebody please help me.

I am using win 7

--
Posted via http://www.ruby-forum.com/.

Elizabeth McGurty

unread,
Jul 7, 2015, 12:08:41 PM7/7/15
to rubyonra...@googlegroups.com
I have done many Windows 7 Ruby installations.  I am guessing that you are working from old documentation.  Where were you informed to run ruby setup.rb?

Aravind Thiru

unread,
Jul 8, 2015, 2:56:27 AM7/8/15
to rubyonra...@googlegroups.com
I am following Ruby on Rails 3 Tutorial LiveLessons Bundle by Michael
Hartl's instructions.

So
I installed Cygwin64 Terminal
Downloaded rubygems-2.4.8 from official website
Cd to rubygems-2.4.8
ls
---There i found setup.rb

$ ruby setup.rb
/usr/lib/ruby/2.2.0/rubygems.rb:8:in require': cannot load such file --
rbconfig (LoadError)
from /usr/lib/ruby/2.2.0/rubygems.rb:8:in< top (required) >'
from < internal:gem_prelude >:1:in require'
from <internal:gem_prelude>:1:in< compiled > '

This is it. Please help me out.

Elizabeth McGurty

unread,
Jul 8, 2015, 10:04:05 AM7/8/15
to rubyonra...@googlegroups.com
I'm no authority on ROR on cygwin66....  Not making any promises....

Did a little research, and found this at:
http://code.openhub.net/file?fid=_l-OijNPFX7fzeTZ7tG1bdwGj-U&cid=teq11amO2NQ&s=&fp=299059&mp&projSelected=true#L0

It's setup.rb, obviously you can search your environment for setup.rb to trace the rbconfig error......  

Seems that if rubygems are already loaded you will get a rbconfig error.

#--
# Copyright 2006, 2007 by Chad Fowler, Rich Kilmer, Jim Weirich, Eric Hodel
# and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++

if RUBY_VERSION < "1.8.7"
  $stderr.puts "Rubygems now requires Ruby 1.8.7 or later"
  exit 1
end

# Make sure rubygems isn't already loaded.
if ENV['RUBYOPT'] or defined? Gem then
  ENV.delete 'RUBYOPT'

  require 'rbconfig'
  config = defined?(RbConfig) ? RbConfig : Config

  ruby = File.join config::CONFIG['bindir'], config::CONFIG['ruby_install_name']
  ruby << config::CONFIG['EXEEXT']

  cmd = [ruby, 'setup.rb', *ARGV].compact
  cmd[1,0] = "--disable-gems" if RUBY_VERSION > "1.9"

  exec(*cmd)
end


Dir.chdir File.dirname(__FILE__)

$:.unshift 'lib'
require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'

Gem::CommandManager.instance.register_command :setup

args = ARGV.clone
if ENV["GEM_PREV_VER"]
  args = [ '--previous-version', ENV["GEM_PREV_VER"] ] + args
end
args.unshift 'setup'

begin
  Gem::GemRunner.new.run args
rescue Gem::SystemExitException => e
  exit e.exit_code
end

So first I would try
echo $RUBYOPT
I believe that it should return empty, which may indicate that gems are already installed

Then I would try....

skip ruby setup, and try

Following the instructions from https://rubygems.org/pages/download#formats

gem update --system

Hope this help....

Aravind Thiru

unread,
Jul 8, 2015, 11:34:07 AM7/8/15
to rubyonra...@googlegroups.com
Thanks for the reply.

I tried echo $RUBYOPT....it returned empty

Then i followed instructions in
https://rubygems.org/pages/download#formats

Download from above
Unpack into a directory and cd there
Install with: ruby setup.rb (you may need admin/root privilege)

But the same error persist. A friend of mine suggested rails installer.
So i am gonna install that. Anyways thanks for your time.

Sadaf Noor

unread,
Jul 9, 2015, 2:00:27 AM7/9/15
to rubyonra...@googlegroups.com
You can also try railsintaller ( http://railsinstaller.org/en ). Back then when I had windows, I used that as far as I can remember.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0c860eecd367dbb9de3b139b5bcfd34c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.



--
 Md. Sadaf Noor (@sadaf2605)
 www.sadafnoor.com
Reply all
Reply to author
Forward
0 new messages