我想为我的应用程序使用Alpha版本的rails。它在rubygems.org上不可用,所以我在Gemfile中使用它:
gem 'rails', github: 'rails/rails', branch: 'master' # Use rails 6.0.0.alpha, FIXME: to be updated on rails release
bundle install
经过了:
...
Installing sprockets 3.7.2
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Using rails 6.0.0.alpha from git://github.com/rails/rails.git (at master@5df4efd)
Bundle complete! 1 Gemfile dependency, 40 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
但是rails --version
显示出奇怪的输出(我在Mac上使用的是RVM):
rails --version
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
但是bundle info rails
似乎还可以:
The git source `git://github.com/rails/rails.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
* rails (6.0.0.alpha 5df4efd)
Summary: Full-stack web application framework.
Homepage: http://rubyonrails.org
Path: /Users/ro/.rvm/gems/ruby-2.5.1/bundler/gems/rails-5df4efd2fd08
如何修复我的Alpha rails
命令?
答案 0 :(得分:1)
已修复
rvm remove ruby-2.3.1
(红宝石的旧版本)
我也有旧的gemset,像rvm gemset list_all
和rmv gemset list
这样的命令会很有帮助。