在此帖子底部找到错误日志
我已经关注了如何在Cloud9上创建Ruby on Rails应用程序的this教程系列,但遇到了障碍。
我到达了可以通过Cloud9将代码部署到Heroku服务器的部分。为了做到这一点,本教程的人建议将Ruby版本从默认的2.1.5
更改为2.1.4部署进展顺利,网站在Heroku上正常运行,但现在我已经失去了在Cloud9上运行它的能力。请注意,我的bash_profile文件包含以下命令:
rvm use 2.1.4
source ~/.profile
我遇到这个问题的任何想法?
记录:
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.1.4/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.4'.
Using /usr/local/rvm/gems/ruby-2.1.4
Your code is running at https://foosite-foouser.c9.io.
Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.1.4/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.4'.
Using /usr/local/rvm/gems/ruby-2.1.4
Your Ruby version is 2.1.5, but your Gemfile specified 2.1.4
更新
rvm list输出:
foouser@foosite:~/workspace (master) $ rvm list
rvm rubies
ruby-1.8.7-p374 [ x86_64 ]
ruby-1.9.3-p547 [ x86_64 ]
=* ruby-2.1.4 [ x86_64 ]
ruby-2.1.5 [ x86_64 ]
# => - current
# =* - current && default
更新2
运行rails s -b $IP -p $PORT
=> Booting WEBrick => Rails 4.1.6 application starting in development on http://0.0.0.0:8080 => Run `rails server -h` for more startup options => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option) => Ctrl-C to shutdown server [2015-04-17 21:29:28] INFO WEBrick 1.3.1 [2015-04-17 21:29:28] INFO ruby 2.1.4 (2014-10-27) [x86_64-linux] [2015-04-17 21:29:28] INFO WEBrick::HTTPServer#start: pid=2626 port=8080
答案 0 :(得分:1)
根据Mutahhir的建议,这是将rails runner配置为2.1.4的问题