【问题标题】:Why does this happen when i try to update rails to 4.0.0?为什么当我尝试将 rails 更新到 4.0.0 时会发生这种情况?
【发布时间】:2016-08-13 06:48:45
【问题描述】:

我从 github 上提取了某人的项目,我们似乎使用了不同的 rails 版本。当我更新 rails gem 时,似乎一切正常,但是当我检查版本时,它仍然显示以前的版本,并且不会运行 rails 服务器。

me@ubuntu:~/Documents/RailsProjects/vega$ gem install rails   
--version=4.0.0
Successfully installed rails-4.0.0
Parsing documentation for rails-4.0.0
Done installing documentation for rails after 0 seconds
1 gem installed
me@ubuntu:~/Documents/RailsProjects/vega$ rails -v
Rails 3.2.6

【问题讨论】:

    标签: ruby-on-rails ruby server rubygems version


    【解决方案1】:

    您安装了多个 Rails 版本,它会报告找到的第一个版本。

    项目有 gemfile 吗?如果是这样,请让 bundle 为您处理:

    bundle install
    bundle exec rails s
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-24
      • 1970-01-01
      • 1970-01-01
      • 2012-03-08
      • 2023-01-11
      • 1970-01-01
      • 1970-01-01
      • 2021-04-30
      相关资源
      最近更新 更多