刚刚将我的系统更新为El Capitan,当启动rails服务器(在Yosemite上非常有效)时,我会收到以下警告。
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring bcrypt-ruby-3.1.2 because its extensions are not built. Try: gem pristine bcrypt-ruby --version 3.1.2
Ignoring bcrypt-ruby-3.0.1 because its extensions are not built. Try: gem pristine bcrypt-ruby --version 3.0.1
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.当运行引用的命令时,我得到:
-bash: bundle: command not found
rails update
Ignoring json-1.8.1 because its extensions are not built. Try: gem pristine json --version 1.8.1
Ignoring json-1.8.2 because its extensions are not built. Try: gem pristine json --version 1.8.2
Ignoring json-1.8.3 because its extensions are not built. Try: gem pristine json --version 1.8.3
Ignoring nokogiri-1.6.6.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.6.2
Ignoring atomic-1.1.14 because its extensions are not built. Try: gem pristine atomic --version 1.1.14
Ignoring atomic-1.1.14 because its extensions are not built. Try: gem pristine atomic --version 1.1.14
Ignoring bcrypt-ruby-3.0.1 because its extensions are not built. Try: gem pristine bcrypt-ruby --version 3.0.1
Ignoring binding_of_caller-0.7.2 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.7.2
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find bcrypt-3.1.10 in any of the sources
Run `bundle install` to install missing gems.也尝试过运行:
sudo gem pristine --all
Restoring gems to pristine condition...
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/gems/CFPropertyList-2.2.8/README所以现在,它甚至找不到包安装路径。好像是更新把事情搞砸了。
当我运行gem pristine --all时,我得到以下信息:
Restored bcrypt-ruby-3.1.5
Skipped bigdecimal-1.2.0, it is a default gem
Building native extensions. This could take a while...
Restored binding_of_caller-0.7.2
Restored bootstrap-sass-3.3.5.1
Restored builder-3.2.2
Restored builder-3.1.4
Restored bundler-1.10.6
Restored bundler-1.9.6
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Ext::BuildError)
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151001-3494-1jca623.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h', needed by `breakpoint.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/byebug-6.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/byebug-6.0.2/gem_make.out发布于 2015-10-02 17:59:05
解决方案在下面的链接中。
硬件
升级到El Capitan,使用Homebrew和Ruby
..。以及Xcode和Java等。
如果你还没有安装自制软件,那就先这样做,这样你就不用处理SIP问题了。安装苹果菜单中提供的所有软件更新,包括El Capitan。
安装和强制重新启动我的27“雷霆显示不会显示任何东西。拔掉插头,应答没有帮助。再重新启动修复它。
软件
为了..。
Xcode
El Capitan安装删除了我的Xcode安装,所以我不得不在App中搜索它并重新安装。我现在相信,我删除了一段时间前的Xcode,并忘记了,因此重新安装。我在一台很少用的机器上做了这件事。
在Xcode安装完成后,打开iTerm (我将其用作Terminal.app替换),如果您愿意的话,打开Terminal.app。
∴ xcode-select --install
xcode-select: note: install requested for command line developer tools打开一个对话框,我选择了“安装”,它在大约一分钟内完成。
Java
接下来,运行java,它会提示一个对话框,其中有一个“更多信息”按钮,它会带您到一个网站,在那里您可以接受许可并下载Java .dmg文件。如果您打算运行基于java命令行的工具,则需要JDK,而不是JRE。
Unable to find any JVMs matching version "1.7".
No Java runtime present, try --request to install.
∴ java
No Java runtime present, requesting install.下载后,打开.dmg (对我来说是jdk-8u60-macosx-x64.dmg)并安装,然后重新启动iTerm。
∴ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)像RubyMine这样的应用程序现在应该可以工作了,至少可以发布。
自制软件
医生告诉我几个警告,我照指示处理了。
∴ brew doctor
∴ sudo chown -R $(whoami):admin /usr/local
∴ cd /usr/local/Library && git stash && git clean -d -f
∴ cd ~
∴ brew prune
∴ brew unlink qt5然后我就能更新家用啤酒了。
∴ brew updateqt5
我知道凯巴拉-webkit创业板需要qt5,而且我知道qt是自制/ El问题跟踪器中的主要的剩余痛点之一,所以我决定先摆脱它。
∴ brew uninstall qt5
∴ brew install qt5
∴ brew linkapps qt5
∴ brew link --force qt5最后一行是使qmake可用所必需的。检查使用哪种qmake。否则,在Capybara安装之后,您将得到这样的结果:
Ext::BuildError: ERROR::未能构建创业板本机扩展。
/Users/pboling/.rvm/rubies/ruby-2.1.2/bin/ruby -r ./siteconf20150930-48087-1vw6bye.rb extconf.rb
sh: qmake: command not found
*** extconf.rb failed ***GPG
一些软件现在正在与GPG签署,比如RVM,所以请安装它。
∴ brew install gpgRVM
我的Ruby正在工作,但是我在一些本地的gem安装上遇到了问题,所以我决定重新开始使用针对所有新的自制和Xcode库编译的Ruby。
∴ rvm implode由于权限问题,内爆实际上未能删除主~/.rvm目录。我不得不把它移除。
∴ sudo rm -rf /Users/pboling/.rvm按照这里的说明安装RVM,我安装了开发版本,希望它会有更多的El Capitan修复:
∴ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
∴ \curl -sSL https://get.rvm.io | bash我目前使用的主要应用程序是使用Ruby2.1.2,所以我首先安装它,然后转到项目目录中创建go集并进行捆绑。
∴ rvm install 2.1.2
∴ cd ~/project
∴ gem install bundler -v 1.9.7
∴ bundle installBundler版本1.9.7,因为这正是Heroku所使用的,而且我希望保持同步,因为1.10*更改了使Gemfile.lock与部署服务器上的1.9.7不兼容的东西(对我来说,使用多个gem源、私有gem服务器等等)。
波斯特格斯
我还借此机会升级到最新的Postgres.app。或者,您可以使用brew安装postgres安装postgres。我选择Postgres.app,因为它是由Heroku直接支持的,而且我喜欢在某个地方有一个均等的胜利。
发布于 2015-10-01 02:31:54
您应该尝试RVM或RBENV或任何一周的口味。这将允许您在每个项目的基础上轻松地管理Ruby解释器和Gemset。我仍然使用RVM,我对它很满意。
https://stackoverflow.com/questions/32877953
复制相似问题