10

我得到了这个问题。我认为安装了捆绑程序。而且因为我无法在 RoR 中创建应用程序时捆绑安装,或者直接在项目中捆绑安装。如果您遇到任何问题并找到解决方案,请帮助我。

enter code here     :run  bundle install
:Fetching gem metadata from https://rubygems.org/.
:Error Bundler::HTTPError during request to dependency API
:Fetching full source index from https://rubygems.org/
:Could not reach https://rubygems.org/
4

3 回答 3

29

如果您安装了 gem,则可以使用bundle install --local. 它不需要互联网连接

于 2012-05-17T23:22:39.867 回答
3

以下方法对我有用。

$ rails new blog -B # -B tells rails not to run bundle install
cd blog
$ bundle install --local
Edit the GemFile and uncomment the line "therubyracer"
$ rails server
=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2013-09-28 19:09:35] INFO  WEBrick 1.3.1
[2013-09-28 19:09:35] INFO  ruby 2.0.0 (2013-05-14) [i686-linux]
[2013-09-28 19:09:35] INFO  WEBrick::HTTPServer#start: pid=1635 port=3000
于 2013-09-28T13:38:44.283 回答
2

You will need to be online so that bundler can check with rubygems that you have the latest gems and download them if necessary.

于 2012-05-17T12:16:01.537 回答