在命令行输入“bundle install”后,我得到“确保gem安装了json - v1.8.2”在捆绑之前成功。

时间:2023-01-25 20:05:35

I've been following this lynda tutorial online on 'Ruby on Rails.' I've downloaded Ruby, devkit and rails on to my computer. After I created sample_app and tried to run bundle install, but it keeps telling me make sure that 'gem install json -v 1.8.2' succeeds before bundling" I try to run gem install json -v 1.8.2 and other variations including "gem install json -v 1.8.2 --verbose", "gem install json --platform=ruby" but everytime I get an error saying that it failed to build gem native extensions. The same thing happened when I was following the downloading devkit tutorial and I tried to install JSON as per its instructions. I've tried using gem update system 2.3.0 but that doesn't work either. What could be wrong?

我一直在关注这个lynda教程在线上的Ruby on Rails。我把Ruby、devkit和rails下载到我的电脑上。我创建了sample_app后试图运行包安装,但它一直告诉我确保“gem安装json - v 1.8.2”成功之前捆绑”我试着运行gem安装json - v 1.8.2和其他的变化包括“gem安装json - v 1.8.2——verbose”、“gem安装json平台= ruby”但每次我得到一个错误说它未能构建宝石原生扩展。同样的事情发生在我下载devkit教程的时候,我试着按照它的指示来安装JSON。我试过使用gem更新系统2.3.0,但那也不行。可能是错的呢?

2 个解决方案

#1


0  

Typically this will happen on Windows because not all the commands are availible. I would recommended that you either use VirtualBox with an Ubuntu image or use Cloud9 IDE.

通常情况下,这将发生在Windows上,因为并非所有的命令都是可靠的。我建议您要么使用带有Ubuntu映像的VirtualBox,要么使用Cloud9 IDE。

#2


0  

I just experienced the same problem myself. I am working my way from Windows to a Mac but not quite there just yet. Windows is ok for Rails development (been doing so for 3 years) although it does present some unique issues occasionally. Check out the following link to downgrade RubyGems to 1.8.29 and then try running bundle install again.

我自己也遇到过同样的问题。我正在用我的方式从Windows到Mac,但还没有完全实现。Windows对于Rails开发来说是可以接受的(已经这样做了3年),尽管它偶尔也会出现一些独特的问题。查看以下链接,将RubyGems降级为1.8.29,然后再次尝试运行bundle安装。

Issue with Ruby gem install

使用Ruby gem安装。

#1


0  

Typically this will happen on Windows because not all the commands are availible. I would recommended that you either use VirtualBox with an Ubuntu image or use Cloud9 IDE.

通常情况下,这将发生在Windows上,因为并非所有的命令都是可靠的。我建议您要么使用带有Ubuntu映像的VirtualBox,要么使用Cloud9 IDE。

#2


0  

I just experienced the same problem myself. I am working my way from Windows to a Mac but not quite there just yet. Windows is ok for Rails development (been doing so for 3 years) although it does present some unique issues occasionally. Check out the following link to downgrade RubyGems to 1.8.29 and then try running bundle install again.

我自己也遇到过同样的问题。我正在用我的方式从Windows到Mac,但还没有完全实现。Windows对于Rails开发来说是可以接受的(已经这样做了3年),尽管它偶尔也会出现一些独特的问题。查看以下链接,将RubyGems降级为1.8.29,然后再次尝试运行bundle安装。

Issue with Ruby gem install

使用Ruby gem安装。