Nokogiri 不会让我在 Rails 中捆绑安装 [英] Nokogiri won't let me bundle install in Rails

查看:41
本文介绍了Nokogiri 不会让我在 Rails 中捆绑安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有人问过这个问题,并尝试了我看到的所有建议.

I've seen this question asked and tried everything I've seen suggested.

我有一台新的 macbook,想设置一个现有的应用程序.当我克隆该应用程序时,它不会捆绑安装并且就像未安装 Rails 一样,即使它在其他目录中工作.

I got a new macbook and am looking to set up an existing app. When i clone the app, it will not bundle install and acts like Rails is not installed, even though it works in other directories.

我尝试从 gemfile 中删除版本号并删除 gemfile.lock.我试过捆绑更新.我使用的是 osx 10.9.4、rails 4.1.5 和 ruby​​ 2.1.1.

I tried removing version numbers from gemfile and deleting gemfile.lock. I tried bundle update. I'm on osx 10.9.4, rails 4.1.5 and ruby 2.1.1.

我得到的错误:

An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling.

我已经安装了 rvm.我尝试重新安装自制软件、Rails 和 ruby​​.

I have rvm installed. I tried reinstalling homebrew, rails and ruby.

可能是什么?

推荐答案

好的,呸.这有效:

http://jasdeep.ca/2013/10/installing-nokogiri-fails-os-x-mavericks/

xcode-select --install
gem install nokogiri
bundle config build.nokogiri --use-system-libraries
bundle install

然后,pg gem 不会让 bundle 安装.这修复了它 - 在 OS X 上安装 PG gem - 无法构建本机扩展

then, the pg gem wouldnt let bundle install. this fixed it - Installing PG gem on OS X - failure to build native extension

brew update
brew install postgresql
gem install pg

然后... bundle install 终于成功了,但是 rails s 给了我一个错误,这个错误已修复:未设置设计密钥

then... bundle install worked, finally, but rails s was giving me an error, which this fixed: Devise Secret Key was not set

只需在最后一个结束"之前将带有密钥的行添加到 config/initializers/devise.rb 中

just had to add the line w/the secret key to the config/initializers/devise.rb right before the last 'end'

希望这对升级到 Mavericks/安装新电脑的人有所帮助!

hope this helps anyone who upgrades to Mavericks / gets a new computer that comes with it installed!

这篇关于Nokogiri 不会让我在 Rails 中捆绑安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆