RVM/rbenv RVM 总是提示"rvm rvmrc warning ignore"

johnlu · 2013年07月22日 · 最后由 JohnLu 回复于 2013年07月23日 · 9149 次阅读

终端进入到 rails app 目录后总是提示

RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/johnlu/rails_projects/mysampleapp/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.

Gemfile 的内容为:

source 'http://ruby.taobao.org'
ruby '2.0.0'

gem 'rails', '4.0.0'

group :development, :test do
  gem 'sqlite3', '1.3.7'
  gem 'rspec-rails', '2.13.1'
end

group :test do
  gem 'selenium-webdriver', '2.0.0'
  gem 'capybara', '2.1.0'
end

gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
end

系统:Ubuntu 12.04

不要沉了!!

因为你 Gemfile 里写了

ruby '2.0.0'

#2 楼 @messiahxu 有那些影响吗?

#2 楼 @messiahxu 但是,教程里有写。

因为 rvm 升级后不推荐使用 .rvmrc 文件了。 你可以运行提示中的 rvm rvmrc warning ignore /home/johnlu/rails_projects/mysampleapp/Gemfile,忽略掉这个 Warning。 或者 rvm rvmrc to ruby-version 手动将 .rvmrc 转成 .ruby-version.ruby-gemset

#5 楼 @hbin 好的,明白了。多谢!

#3 楼 @JohnLu 没有影响,你要嫌碍眼,按提示里的忽略掉就好

需要 登录 后方可回复, 如果你还没有账号请 注册新账号