我刚在OS X Mountain Lion上安装了RVM,Ruby 2.0和Rails 3.2.15。每次我开始一个新的Rails项目时,我都会得到以下结果:
➜ ~ rails new new_proj
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/mailers
create app/models
create app/views/layouts/application.html.erb
create app/mailers/.gitkeep
create app/models/.gitkeep
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create lib/assets
create lib/assets/.gitkeep
create log
create log/.gitkeep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/index.html
create public/robots.txt
create script
create script/rails
create test/fixtures
create test/fixtures/.gitkeep
create test/functional
create test/functional/.gitkeep
create test/integration
create test/integration/.gitkeep
create test/unit
create test/unit/.gitkeep
create test/performance/browsing_test.rb
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.gitkeep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.gitkeep
create vendor/plugins
create vendor/plugins/.gitkeep
run bundle install
/Gemfile not found
以下是which rails
和which gem
以及which bundle
➜ ~ which rails
/Users/jeff/.rvm/gems/ruby-2.0.0-p247/bin/rails
➜ ~ which gem
gem () {
typeset result
(
typeset rvmrc
rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
if [[ -n "${rvm_prefix:-}" ]] && ! [[ "$HOME/.rvmrc" -ef "${rvm_prefix}/.rvmrc" ]]
then
rvm_rvmrc_files+=("${rvm_prefix}/.rvmrc")
fi
for rvmrc in "${rvm_rvmrc_files[@]}"
do
[[ -s "${rvmrc}" ]] && source "${rvmrc}" || true
done
unset rvm_rvmrc_files
command gem "$@"
) || result=$?
hash -r
return ${result:-0}
}
➜ ~ which bundle
/Users/jeff/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle
有谁知道为什么?
答案 0 :(得分:0)
我将'bundle exec'
命令别名,我得到了和你一样的错误。我删除了别名...... BOOM!它有效!