Ubuntu安装Gems报错的解决办法


安装执行:
sudo -u git -H bundle install --deployment --without development test postgres

 

安装的时候出现了两个问题

第一个报错:

Fetching source index from https://rubygems.org/
Could not find modernizr-2.6.2 in any of the sources

最终成功的解决办法:

sudo vim Gemfile

"modernizr", "2.6.2" 改成 "modernizr-rails", "2.7.1"
sudo vim Gemfile.lock

modernizr (2.6.2) 改成 modernizr-rails (2.7.1)

modernizr (= 2.6.2) 改成
modernizr-rails (= 2.7.1)

继续安装,有如下报错:

Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql2-0.3.11 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
安装文件
sudo apt-get install libmysql-ruby libmysqlclient-dev

sudo apt-get install libmysqlclient-dev

  

安装完成,提示:

Your bundle is complete!
Gems in the groups development, test and postgres were not installed.
It was installed into ./vendor/bundle

 

posted @ 2014-08-22 00:09  蘑菇肉片  阅读(766)  评论(0编辑  收藏  举报