问题
I am creating a new project:
rails new ggg --database=mysql
and get following output:
create
create README
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/stylesheets
create vendor/assets/stylesheets/.gitkeep
create vendor/plugins
create vendor/plugins/.gitkeep
run bundle install
task "bundle install" takes a lot of time... about 30-40 minutes.
How to remove it?
回答1:
You want the --skip-bundle flag:
rails new ggg --database=mysql --skip-bundle
However, to run your new app, you will still need to do a bundle install anyway, so you should determine why it's taking so long.
回答2:
To solve your issue more permanently, create a regular rails app. Yes, I know it might take a long time for you.
rails new ggg --database=mysql
Then, inside the app, do a bundle install --system:
cd ggg
bundle install --system
This will copy all the gems you are having to install locally inside the project folder to your system folder. From now, it will be quick to create new projects.
来源:https://stackoverflow.com/questions/7378501/how-to-remove-bundle-install-command-during-the-project-creation-in-rails-3-1