简体   繁体   中英

Bundler having trouble with Git

I've cloned Discourse 's master branch. My shared host is pretty new to Ruby on Rails. It won't let me run bundle install on any gem that uses Git. The error:

Gemfile syntax error:
/home/soociali/rails_apps/Discus/Gemfile:3: syntax error, unexpected ':', expecting $end
...ctive_model_serializers', git: 'git://github.com/rails-api/a...
                          ^

The Gemfile: https://github.com/discourse/discourse/blob/master/Gemfile

This is because the file you are trying to run has a syntax that belongs to Ruby 1.9 and you have an older version installed on your computer. You need to update it.

I don't know which OS are you using. Install Ruby 1.9 on CentOS is a guide for CentOS and it might give you an idea on how to update it.

Or use RVM . It will make your life easier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM