使用rbenv因此,創建一個新的應用程序的過程是一個有點令人費解:如何在Rails中只生成Gemfile?
- 創建目錄
- 光盤目錄
- 套裝紅寶石版本:
rbenv local 1.9.3-p125
(或其他版本) - 套裝寶石:
echo project-name > .rbenv-gemsets
gem install rails -v 3.2.2 --no-rdoc --no-ri
(例如)rbenv rehash
echo "gem 'rails', '3.2.2'" > Gemfile
bundle
rails new .
(輸入y覆蓋)bundle
此工作過,但這次我上了rails new .
命令是錯誤的:
...
...
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.gitkeep
create vendor/plugins
create vendor/plugins/.gitkeep
run bundle install
b/gems/bundler-1.2.1/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'jquery-rails (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
運行rails new .
第二次投擲
Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
什麼是初始化一個新的Rails應用程序,如果它不可能做rails new app-name
的最佳方式?
如何創建Gemfile?如果我有正確的Rails的Gemfile,然後bundle
和rails new .
應該工作...
這個問題似乎是安裝jquery-rails。你是否嘗試再次運行包? – nathanvda