2017-03-01 50 views
0

当我运行此命令:轨道/ RVM:问题的运转轨道的服务器和捆绑

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

我的Rails服务器将运行,以及捆绑等。然而,当我结束会话,我得到这个错误:

/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.1 红宝石版本: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/] 
+0

它说找不到'railties'宝石。你把它添加到你的Gemfile之后试过了吗?检查此:http://stackoverflow.com/a/9212169/2651076 – Sinstein

+0

可能重复[Rails:找不到railties](http://stackoverflow.com/questions/9212116/rails-could-not-find-railties ) – Sinstein

+0

我已经尝试了他们。 @Sinstein – user2026178

回答

2

您是否尝试过运行rvm get stable --auto-dotfiles作为最后一个错误消息,设置RMV正确的建议?它似乎在Ruby 2.0中寻找依赖关系(显示在第一条错误消息中)。