我刚刚在运行Snow Leopard的Macbook上安装了 Ruby,Rails,Git和RVM 10.6.8一切都很好,除非我运行rails new sample_app,它在运行时卡住捆绑安装
有没有什么方法可以加快这个速度/大约10分钟这就是这样,我想知道我做错了什么..
这是用于安装 RVM,Ruby和Rails 的命令:
$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
我还需要做其他事吗?这很痛苦......
rails new demo_app
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/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/filter_parameter_logging.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 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
答案 0 :(得分:3)
系统正在“挂起”,因为它正在bundle install
生成的Gemfile中通过rails new <project>
安装所有gem。这是预期的行为。它要求您输入密码,以便它可以安装一些需要sudo
访问权限的文件(最有可能将轨道可执行文件放在您的路径中)。
通过传递bundle install
参数调用rails new,可以跳过--skip-bundle
步骤。在运行应用程序之前,您仍然需要调用bundle install,但至少可以控制它何时发生。
当您知道要更改Gemfile时使用 - -skip-bundle
很有用,这样您就不必等待捆绑器安装所有宝石,然后再在几个宝石中再次运行分钟
答案 1 :(得分:0)
似乎你是代理人的背后,这就是为什么Bundle它的工作速度不如你想要的那么快。
将HTTP_PROXY环境变量设置为指向您的代理URL。
答案 2 :(得分:0)
您可以手动安装所有这些宝石
bundle install