由于 ruby 版本错误,无法 运行 Cloud9 上的 RoR 站点

Cannot run RoR site on Cloud9 due to ruby version error

在此 post

底部找到错误日志

我已经按照 this 教程系列学习如何在 Cloud9 上的 Rails 应用程序上制作 Ruby,但 运行 遇到了麻烦。

我到达了可以通过 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 列表输出:

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

来自 运行ning 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

根据 Mutahhir 的建议,将 rails 运行程序配置为 2.1.4