Forum: Ruby on Rails sudo gem install rails not working because of problem with alias_method and is_file

Posted by Alex M. (alex_m)
on 2013-01-13 03:29
I had downloaded ruby, rails, and rubygems previously on my hard drive
when I ran Windows. I just downloaded Ubuntu and tried to use RoR but it
wasn't working, so I figured I had to follow the installation procedure
listed here http://guides.rubyonrails.org/getting_started.html to get it
working. When I type in

sudo gem install rails

I get the following error message

/usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:383:in
`alias_method': undefined method `is_file' for class
`Gem::Package::TarReader::Entry' (NameError)
  from /usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:383:in
`<class:Entry>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:319:in
`<class:TarReader>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:311:in
`<module:Package>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:46:in
`<module:Gem>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/package.rb:18:in `<top
(required)>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:21:in
`require'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:21:in
`require'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/builder.rb:1:in `<top
(required)>'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:21:in
`require'
  from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:21:in
`require'
  from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:61:in `manage_gems'
  from /usr/bin/gem:4:in `<main>'

I have no idea how to solve this. At this point I just want to delete
everything having to do with rails and ruby and start over again. How do
I do this?
Posted by Colin Law (Guest)
on 2013-01-13 10:57
(Received via mailing list)
On 13 January 2013 02:29, Alex M. <lists@ruby-forum.com> wrote:
> I had downloaded ruby, rails, and rubygems previously on my hard drive
> when I ran Windows. I just downloaded Ubuntu and tried to use RoR but it
> wasn't working, so I figured I had to follow the installation procedure
> listed here http://guides.rubyonrails.org/getting_started.html to get it
> working. When I type in
>
> sudo gem install rails

I strongly advise using rvm to install Ruby and Rails in Ubuntu

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.