rbenv を使用すると、新しいアプリを作成するプロセスが少し複雑になります。
- ディレクトリを作成
- CDディレクトリ
- Ruby のバージョンを設定:
rbenv local 1.9.3-p125(または他のバージョン) - ジェムセットを設定:
echo project-name > .rbenv-gemsets gem install rails -v 3.2.2 --no-rdoc --no-ri(例えば)rbenv rehashecho "gem 'rails', '3.2.2'" > Gemfilebundlerails 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 .2 回目のスローの実行
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 .するはずです...