I'm trying to figure what version of rails I got installed.. If I run on it on my home directory:
我想知道我安装了哪个版本的rails ..如果我在我的主目录上运行它:
cd ~
rails -v
I get
Rails 3.2.13
However if I run it on the home directory of a ruby on rails project I just cloned:
但是,如果我在rails项目上的ruby的主目录上运行它,我只是克隆:
cd /path/to/RoR/project
rails -v
I get
git://github.com/seyhunak/twitter-bootstrap-rails.git (at bootstrap3) is not checked out.
Please run `bundle install`
I'm confused.. why would it point out a missing bootstrap gem when I'm only looking for the rails version?
我很困惑..为什么当我只寻找rails版本时,它会指出一个缺少的bootstrap gem?
1 个解决方案
#1
1
Rails version is declared inside your Gemfile. If you navigate to folder containing Gemfile, RVM automatically switches to rails version specified in this folder (it does the same for Ruby version as well!).
Rails版本在Gemfile中声明。如果导航到包含Gemfile的文件夹,RVM会自动切换到此文件夹中指定的rails版本(对于Ruby版本也是如此!)。
Since you didn't run bundler, Gemfile.lock file is not valid and RVM cannot be sure it contains the right version of rails (some dependencies may require rails to be updated - for bundler rails is just a gem as any other). THat's why it asks you to run bundle.
由于您没有运行bundler,因此Gemfile.lock文件无效,RVM无法确定它是否包含正确版本的rails(某些依赖项可能需要更新rails) - 因为bundler rails只是一个宝石,就像其他任何东西一样。这就是它要求你运行bundle的原因。
Hope it makes sense. :)
希望它有意义。 :)
#1
1
Rails version is declared inside your Gemfile. If you navigate to folder containing Gemfile, RVM automatically switches to rails version specified in this folder (it does the same for Ruby version as well!).
Rails版本在Gemfile中声明。如果导航到包含Gemfile的文件夹,RVM会自动切换到此文件夹中指定的rails版本(对于Ruby版本也是如此!)。
Since you didn't run bundler, Gemfile.lock file is not valid and RVM cannot be sure it contains the right version of rails (some dependencies may require rails to be updated - for bundler rails is just a gem as any other). THat's why it asks you to run bundle.
由于您没有运行bundler,因此Gemfile.lock文件无效,RVM无法确定它是否包含正确版本的rails(某些依赖项可能需要更新rails) - 因为bundler rails只是一个宝石,就像其他任何东西一样。这就是它要求你运行bundle的原因。
Hope it makes sense. :)
希望它有意义。 :)