我写了这个命令来创建一个新的rails项目
rails new My_project
除了最后的错误信息(请向下滚动)
之外,一切正常 create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
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/views/layouts/application.html.erb
create app/assets/images/.keep
create app/mailers/.keep
create app/models/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/bundle
create bin/rails
create bin/rake
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/secrets.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/cookies_serializer.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.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 lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/robots.txt
create test/fixtures
create test/fixtures/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.keep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.keep
run bundle install --local
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:326:in `bundle_command'
from /usr/lib/ruby/vendor_ruby/rails/generators/app_base.rb:342:in `run_bundle'
from (eval):1:in `run_bundle'
from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in `run'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:in `invoke_command'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in `block in invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in `each'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in `map'
from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:133:in `invoke_all'
from /usr/lib/ruby/vendor_ruby/thor/group.rb:232:in `dispatch'
from /usr/lib/ruby/vendor_ruby/thor/base.rb:440:in `start'
from /usr/lib/ruby/vendor_ruby/rails/commands/application.rb:17:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/vendor_ruby/rails/cli.rb:14:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/bin/rails:9:in `<main>'
我试图通过
访问铁路rails server
rails s
并出现此错误消息
/usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/aseer/Documents/brojects/plog/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
我该怎么办? 请原谅我的英语。
答案 0 :(得分:3)
您是否安装了捆绑包?
gem install bundler
如果没有,试试这个