Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Rails 3.1

I'm trying to install Rails 3.1.

It says to use 'gem install rails --pre' in the announcement blog post here:

http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate

When I try

$ gem install rails --pre

I get the error:

ERROR: While executing gem ... (NameError) uninitialized constant Syck::Syck

What to do?

like image 490
Caitlin Avatar asked Jun 02 '11 00:06

Caitlin


People also ask

How do I install a specific version of a gem?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.

How do I run Ruby on Rails locally?

Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .


1 Answers

Regarding your specific problem: You may be seeing an error introduced by a faulty build of Rails 3.0.8.rc3 that got pushed as "rails --pre". See this issue in the Rails repository.

Instead of

gem install rails --pre

for the newest version, use

gem install rails -v ">=3.1.0rc"

or for 3.1.0.rc1 specifically:

gem install rails --version=3.1.0.rc1

See the guide referenced above for more advice.

like image 95
Daniel Kehoe Avatar answered Oct 02 '22 08:10

Daniel Kehoe