I've just installed Ruby, Rails, Git and RVM on my Macbook running Snow Leopard 10.6.8 All is good, except when I run rails new sample_app, it gets stuck at run bundle install
我刚刚在运行Snow Leopard 10.6.8的Macbook上安装了Ruby,Rails,Git和RVM。一切都很好,除非我运行rails new sample_app,它在运行捆绑安装时卡住了
Is there any way to speed this up/ It's like this for about 10 minutes, and I wonder if I did anything wrong..
有没有什么方法可以加快速度/大约10分钟这就是这样,我想知道我做错了什么..
This is the command used to install RVM, Ruby and Rails:
这是用于安装RVM,Ruby和Rails的命令:
$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
Do I need to do anything else? It's painfully slow...
我还需要做其他事情吗?这很痛苦......
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
3 个解决方案
#1
3
The system is "hanging" because it is installing all the gems, via bundle install
in the Gemfile that rails new <project>
generates. This is the intended behavior. It asks for your password so that it may install some files that it will need sudo
access to write (most likely placing the rail executable in your path).
该系统正在“悬挂”,因为它正在安装所有宝石,通过捆绑安装在导入新
You can skip the bundle install
step when calling rails new by passing it the --skip-bundle
argument. You will still have to call bundle install before you can run your application, but at least you can control when it happens.
通过传递--skip-bundle参数调用rails new时,可以跳过bundle install步骤。在运行应用程序之前,您仍然需要调用bundle install,但至少可以控制它何时发生。
It is useful to use the --skip-bundle
when you know that you are going to change the Gemfile, so that you don't have to wait for bundler to install all the gems before running it again within a few minutes
当您知道要更改Gemfile时使用--skip-bundle非常有用,这样您就不必在几分钟内再次运行它之前等待Bundler安装所有gem。
#2
0
It seems that you are behind a proxy, and this is why the Bundle it's not working as faster as you want.
看起来你是代理人的背后,这就是为什么捆绑它的工作速度不如你想要的那么快。
Set HTTP_PROXY environment var pointing to your proxy url.
将HTTP_PROXY环境var设置为指向您的代理URL。
#3
0
you can manually install all these gems
你可以手动安装所有这些宝石
bundle install
#1
3
The system is "hanging" because it is installing all the gems, via bundle install
in the Gemfile that rails new <project>
generates. This is the intended behavior. It asks for your password so that it may install some files that it will need sudo
access to write (most likely placing the rail executable in your path).
该系统正在“悬挂”,因为它正在安装所有宝石,通过捆绑安装在导入新
You can skip the bundle install
step when calling rails new by passing it the --skip-bundle
argument. You will still have to call bundle install before you can run your application, but at least you can control when it happens.
通过传递--skip-bundle参数调用rails new时,可以跳过bundle install步骤。在运行应用程序之前,您仍然需要调用bundle install,但至少可以控制它何时发生。
It is useful to use the --skip-bundle
when you know that you are going to change the Gemfile, so that you don't have to wait for bundler to install all the gems before running it again within a few minutes
当您知道要更改Gemfile时使用--skip-bundle非常有用,这样您就不必在几分钟内再次运行它之前等待Bundler安装所有gem。
#2
0
It seems that you are behind a proxy, and this is why the Bundle it's not working as faster as you want.
看起来你是代理人的背后,这就是为什么捆绑它的工作速度不如你想要的那么快。
Set HTTP_PROXY environment var pointing to your proxy url.
将HTTP_PROXY环境var设置为指向您的代理URL。
#3
0
you can manually install all these gems
你可以手动安装所有这些宝石
bundle install