I'm trying to install RoR following railstutorial.org which is pretty similar to this one: http://www.creativereason.com/how-to-install-ruby-on-rails-mountain-lio.html
But, when i type "gem install rails" in command, i'm getting this error and couldn't install RoR.
I'm getting this error:
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (http://production.s3.rubygems.org/latest_specs.4.8.gz)
Does someone know how to fix this and install rails correctly?
Install RVM and ruby:
$ curl -L https://get.rvm.io | bash -s stable --ruby
Then Rails:
rvm gem install rails
Another possibility is that rubygems is out of date:
gem install rubygems-update
and/or
gem update --system
I found the solution: I had to disable Avast antivirus! Now, it's working!
Related
I just tried to install rails by this command:
sudo gem install rails
but error occurs like this:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require'
from extconf.rb:1:in '<main>'
Gem files will reamin installed in /var/lib/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
I tried several times reinstalling ruby and also triedsudo apt-get update
What should I do?
Just follow the below steps and you will be able to install rails easily on ubuntu :
First install rvm (I guess you have already installed) using the command :
$ \curl -L https://get.rvm.io | bash -s stable --ruby
Then install Ruby :
$ rvm install ruby
$ rvm --default use ruby-2.2.3
Then install Node.js for rails :
$ sudo apt-get install nodejs
And lastly , install rails by :
$ > gem install rails
You can check the version of rails installed using :
$ > rails -v
I hope this helps.
Update:
As per #Amit sir's comment , We can use the below command which installs both , ruby and rails combined as :
\curl -sSL https://get.rvm.io | bash -s stable --rails
Rails 4.0 needs RubyGem version 2.0.3, update your rubygem
gem update --system 2.0.3
Hi I am new to Ruby on Rails and trying to setup in my machine [Ububntu 12.04 LTS]. I successfully installed Ruby and Gem now I am getting error while installing Rails
Here is my version of Ruby and Gem
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
$ gem -v
2.1.7
Now when I try command $ sudo gem install rails or $ gem install rails
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://rubygems.org/latest_specs.4.8.gz)
I looked this answer and updated the ca-certificate using $ sudo update-ca-certificates but it is still not working?
Help me as I new to RoR I have no idea what to do next since I have applied all measures I could. Thank you in advanced.
EDIT: Suggest me a way I can solve this problem, incase I don't find one I will be doing it using RVM.
Some packages may b missing. Try this.
rvm get head
rvm requirements run
rvm remove 1.9.3
rvm use 1.9.3 --install --default
gem install rails
I had this issue and simply had to update RubyGems
gem update --system
Most likely rubygems.org is down temporarily, try running this command to add one of the mirrors as source
gem source -a 'https://production.cf.rubygems.org'
and then run
gem install rails
There are some more mirrors available.
Without ssl:
$gem install rails --source http://rubygems.org
hi all i am getting problem while installing rails in by gem :
i have written in terminal
gem install rails
Successfully installed rails-3.0.3
1 gem installed
Installing ri documentation for rails-3.0.3...
File not found: lib
what i need to do next and how to install rails using gem.
I had the same problem. I continued with the error. I do not see anything breaking. And I can code peacefully. So, probably you do not need to worry.
sudo apt-get install build-essential libopenssl-ruby libfcgi-dev
sudo apt-get install ruby irb rubygems ruby1.8-dev
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install rails
sudo gem install sqlite3-ruby
If you dont find path do this: (for Unix based systems)
Quoted from the book, but anyone else would suggest the same
If you can’t find the rails command, you may need to add
/var/lib/gems/1.8/bin to your PATH environment variable.
You can do this by adding a line to your .bashrc file:
export PATH=/var/lib/gems/1.8/bin:$PATH
OK as aditya sanghi has mentioned, I do lack rdoc gem-- so probably running this will help
gem install rdoc rails
I've seen this error when you dont have the "rdoc" gem installed. Can you do a "gem list" and show us a list of gems installed?
Try running "gem install rdoc rails".
I've been poking around the internet looking for a solution on this one... with no luck..
I'm new to rails... If anyone has an idea, I'd love to hear it. Much appreciated!
I enter:
LW:src liamwright$ sudo gem install rails --include-dependencies
And Get:
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: could not find rails locally or in a repository
I am running:
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
Mac OS X 10.5.8
I also tried:
gem sources -r gems.rubyonrails.org
And Get:
source gems.rubyonrails.org not present in cache
Just to check...
...try doing a sudo gem update --system before installing Rails to make sure you have the latest RubyGems installed?
EDIT: Actually, if your RubyGems install is really old, you might need to follow the alternate directions on Gemcutter.
Might want to make sure you have the newest rubygems:
sudo gem install rubygems-update
sudo gem update --system
Then:
sudo gem install rails
I came across this solution on Albertux' blox. Running this script will fix it (It worked perfectly for me on an Ubuntu 9.10 machine):
#!/bin/bash
#(download the latest on http://rubyforge.org/frs/?group_id=126)
wget http://rubyforge.org/frs/download.php/43984/rubygems-update-1.3.0.gem
sudo gem install rubygems-update-1.3.0.gem
sudo update_rubygems
# now this work:
sudo gem update --system
echo "done."
I've just had the same problem trying to upgrade rubygems from 1.2.0 to 1.3.7.
Setp-1)
So I just downloaded rubygems-update-1.3.7.gem from http://rubyforge.org/frs/?group_id=126
Setp-2)
gem install rubygems-update-1.3.7.gem
Setp-3)
update_rubygems
and it work for me.
I'm trying to install rails using the following command:
$ sudo gem install rails --source http://gems.rubyonrails.org
But this is what i'm getting:
WARNING: RubyGems 1.2+ index not found for:
http://gems.rubyonrails.org/
RubyGems will revert to legacy indexes degrading performance.
ERROR: While executing gem ... (Gem::Package::FormatError)
No metadata found!
Any help will be appreciated!
Do you have at least gem version 1.3.1? It's required for Rails 2.2+.
When I run the command it just tries to reinstall 2.3.1. I was trying to upgrade yesterday ;)
There might be a problem with your current sources. First, check the list of source by doing:
$ gem env | grep \"sources\"
Then, remove any non-standard repository:
$ sudo gem sources -r http://my_nonstandard_source.com
Then try to install it again:
$ sudo gem install rails --source http://gems.rubyonrails.org
Hopefully that'll be enough.