PBukuras
PBukuras

Reputation: 67

I am trying to install Rails on Mac however it wont let me

I am trying to install Rails on my Mac however everytime i try to install it I receive this:

$ gem install rails

/Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:369:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 4 (Psych::SyntaxError)
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:369:in `parse_stream'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:317:in `parse'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/psych.rb:244:in `load'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:332:in `load_file'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/config_file.rb:197:in `initialize'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:74:in `new'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:74:in `do_configuration'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/gem_runner.rb:39:in `run'
    from /Users/macbook/.rvm/rubies/ruby-2.1.0/bin/gem:21:in `<main>'

I have searched hours trying to figure this out so any help would be greatly appreciated. I take it this is a simple fix, so apologize in advance for this easy question.

Upvotes: 0

Views: 297

Answers (1)

ranendra
ranendra

Reputation: 2512

It could be that you are using newer version of ruby i.e 2.1.0 which was just released today and the relevant gems for rails are not fully compatible with it.

You can install rails in ruby 2.0.0 through RMV i.e

$ rvm install 2.0.0
$ rvm use 2.0.0
$ ruby -v 
# should retrun 2.0.0-p...
$ gem install rails

Upvotes: 0

Related Questions