rails new - bundle install

牧云@^-^@ 提交于 2019-12-13 03:07:53

问题


i just tried to install rvm/ruby/gems/rails on fresh ubuntu 12.10, and after many errors and googling i wanted to create my first app, but i got this error. How can i make it work?

 root@filip-Ideapad-Z570:/rails_projects# rails new my_fisrt_app
  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/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
/var/lib/gems/1.9.1/gems/bundler-1.3.4/lib/bundler/ui.rb:36:in `initialize': undefined method `[]' for #<Thor::Shell::Color:0x8720238> (NoMethodError)
from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:14:in `new'
from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:14:in `initialize'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `new'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:389:in `start'
from /var/lib/gems/1.9.1/gems/bundler-1.3.4/bin/bundle:20:in `block in <main>'
from /var/lib/gems/1.9.1/gems/bundler-1.3.4/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /var/lib/gems/1.9.1/gems/bundler-1.3.4/bin/bundle:20:in `<main>'

im new to ruby on rails and i realy cant find how to fix this here or on the google, can somebody help me with solution to this?

    /var/lib/gems/1.9.1/gems/bundler-1.3.4/lib/bundler/ui.rb:36:in `initialize': undefined method `[]' for #<Thor::Shell::Color:0x8720238> (NoMethodError)

回答1:


Sounds like an incompatibility with ruby and rails try to install https://rvm.io/. Then rvm install 1.9.3

What does ruby -v return?



来源:https://stackoverflow.com/questions/15438118/rails-new-bundle-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!