Rails / RVM:运行Rails Server和Bundler的问题



当我运行此命令时:

rvm reinstall 2.3.0 --with-openssl-dir=`brew --prefix openssl`

我的导轨服务器将运行,捆绑器等。但是,当我结束会话时,我会收到此错误:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'railties' (>= 0) among 17 total gem(s) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /usr/local/bin/rails:22:in `<main>'

Rails版本:5.0.1Ruby版本:2.4.0p0

我不知道我的环境有什么问题,但是必须重新安装2.3.0变得令人沮丧。我什至不知道为什么重新安装2.3.0版本,这只是这样。

宝石列表

*本地宝石 *

actioncable (5.0.2, 5.0.1)
actionmailer (5.0.2, 5.0.1)
actionpack (5.0.2, 5.0.1)
actionview (5.0.2, 5.0.1)
activejob (5.0.2, 5.0.1)
activemodel (5.0.2, 5.0.1)
activerecord (5.0.2, 5.0.1)
activesupport (5.0.2, 5.0.1)
arel (7.1.4)
bigdecimal (default: 1.2.8)
builder (3.2.3)
bundler (1.14.5)
bundler-unload (1.0.2)
byebug (9.0.6)
coffee-rails (4.2.1)
coffee-script (2.4.1)
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5, 1.0.4)
debug_inspector (0.0.2)
did_you_mean (1.0.0)
domain_name (0.5.20161129)
erubis (2.7.0)
execjs (2.7.0)
executable-hooks (1.3.2)
ffi (1.9.17)
gem-wrappers (1.2.7)
globalid (0.3.7)
http-cookie (1.0.3)
i18n (0.8.1, 0.8.0)
io-console (default: 0.4.5)
jbuilder (2.6.3, 2.6.1)
jquery-rails (4.2.2)
json (default: 1.8.3)
listen (3.0.8)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1, 5.8.3)
multi_json (1.12.1)
net-telnet (0.1.1)
netrc (0.11.0)
nio4r (1.2.1)
nokogiri (1.7.0.1)
pg (0.18.4)
power_assert (0.2.6)
psych (default: 2.0.17)
puma (3.7.1, 3.7.0)
rack (2.0.1)
rack-test (0.6.3)
rails (5.0.2, 5.0.1)
rails-dom-testing (2.0.2)
rails-html-sanitizer (1.0.3)
railties (5.0.2, 5.0.1)
rake (12.0.0, 10.4.2)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
rdoc (default: 4.2.1)
rest-client (2.0.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.4.23)
sass-rails (5.0.6)
spring (2.0.1)
spring-watcher-listen (2.0.1)
sprockets (3.7.1)
sprockets-rails (3.2.0)
sqlite3 (1.3.13)
stripe (1.57.1)
test-unit (3.1.5)
thor (0.19.4)
thread_safe (0.3.6, 0.3.5)
tilt (2.0.6)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
uglifier (3.1.1, 3.0.4)
unf (0.1.4)
unf_ext (0.0.7.2)
web-console (3.4.0)
websocket-driver (0.6.5)
websocket-extensions (0.1.2)

RVM版本

Warning! PATH is not properly set up, '/Users/Niall/.rvm/gems/ruby-2.4.0/bin' is not at first place.
         Usually this is caused by shell initialization files. Search for 'PATH=...' entries.
         You can also re-add RVM to your profile by running: 'rvm get stable --auto-dotfiles'.
         To fix it temporarily in this shell session run: 'rvm use ruby-2.4.0'.
         To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]

您是否尝试过在上一个错误消息中建议的rvm get stable --auto-dotfiles来设置RMV,对吗?看来它在宝石中搜索Ruby 2.0的依赖关系(在第一个错误消息中显示)。

最新更新