How do I install Ruby on Rails? - ruby-on-rails

i have ruby 1.8.6 installed on my machine when i tried gem -v i got gem version 0.9.2
now i do install rails i tried gem install rails
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
getaddrinfo: no address associated with hostname.(SocketError)
why is it so and after installtion where rails is stored. and one thing net connection is required to install rails??

http://www.linux.com/archive/articles/154366
http://rubyonrails.org/download

Use;
http://bitnami.org/stack/rubystack

Related

Gem install rails throwing an UnknownHostError

I am trying to get my rails environment working on a mac with the latest mac OS. I have ruby installed...
ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
When I try to start a rails server I get this message...
rails -s
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
So I run 'sudo gem install rails' and get ....
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://api.rubygems.org/gems/thread_safe-0.3.4.gem)
How would I get around this error?
DNS issue with rubygems is now resolved so all is well, thanks again Shibi for the status update!

Error while installing rails `$ gem install rails`

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

spree error message in Rails

I am new to ruby on rails. I installed ruby and gems both on my ubuntu 10.10 system. My rails -v is 3.0.5 and gem -v is 1.3.7. As my requirement I installed bundler and after that when I installed spree by the command gem install spree I got the following error message:
ERROR: Error installing spree:
spree_core requires will_paginate (= 3.0.pre2, runtime)
I googled many hours but didn't find any good result. So please help me.I am really a newbie in Rails.
Have you tried the following?
gem update --system
gem install will_paginate -v=3.0.pre2 --pre
gem install spree
You tell it manually to install the correct required version of will_paginate. Maybe that helps. Good luck.
This should all work through bundler. Have you added the spree gem to your Gemfile and run bundle install? Are you using RVM? Post the results of bundle list and rvm info(if applicable) if you're still having problems

Gem repository not found when installing rails

I have Ruby 1.8.7 and Ruby 1.9.2 installed on my Windows Machine.
In my console when I do ruby -v it gives me Ruby 1.8.7
Now when I try
gem install rails -v 2.3.8
I get this error
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: could not find gem rails locally or in a repository
My RubyGems version show 1.3.5 so I tried to update it
gem update --system
I get this error
Updating RubyGems
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::E10013: An attempt was made to access a socket in a way forbidden by
its access permissions. - connect(2) (http://gems.rubyforge.org/yaml)`
What is going wrong?
Give this a try.
gem sources
That will show you what sources you are using.
gem sources -a http://rubygems.org
gem sources -a http://gems.github.com
gem sources -a http://gems.rubyforge.org/
Those will add the most used gem sources.
I got the same error, but when I tried to set the company's proxy with SET HTTP_PROXY, I got a problem because the proxy uses NTLM validation and I needed to specify my AD-Domin which won't work wit gem. The way I got around it was installing fiddler and starting it and then setting
SET HTTP_PROXY=http://localhost:8888
afterwards my gems installed like a charm!

Why won't my Ubuntu server install Rails 2.3.8?

I have an older Ubuntu server with a Rails app running on version 2.3.5 that I'd like to move to version 2.3.8. The server doesn't seem to know that there is an update available, no matter how many times I run a "gem update" or "gem update --system" or "update_rubygems"
root#server:~# gem install rails -v 2.3.8
ERROR: could not find gem rails locally or in a repository
root#server:~# gem install rails
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...
RubyGems 1.3.5 is installed.
I don't remember having to do anything special for any of my other servers when making this upgrade.
Any ideas?
Try:
gem install rails --source http://rubygems.org
with --source and without -v.

Resources