Tag: macos

在OS X Yosemite上安装Compass

我正在尝试使用GEM安装指南针,但我有很多错误。 我的macbook pro正在运行OS X Yosemite。 有人有同样的问题吗? 感谢您的时间。 祝你今天愉快 sudo gem install compass Password: ERROR: Error installing compass: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141019-17085-1dv9dek.rb extconf.rb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.5/ext/ffi_c in PATH, mode 040777 checking for ffi.h… /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do’: The compiler failed to generate an executable file. (RuntimeError) You have […]

在Mac OS X上调试Ruby中的malloc错误

我正在尝试调试运行一些Ruby脚本时遇到的以下错误: ruby(47333,0x7fff72aee960) malloc: *** error for object 0x7f98b6a6e3f0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug 知道如何实际设置这样的断点和调试吗? 我想看看这是由Ruby本身还是一些扩展引起的。 我正在使用Mac OS X 10.7.3 (Lion)和ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0] 。

/usr/local/lib/libz.1.dylib,文件是为i386构建的,它不是被链接的体系结构(x86_64)

在我的Mac上安装好几件事时遇到这个问题,我认为这个问题来自于将我的豹升级到雪豹。 此外,这个问题也与我认为的macports有关。 /usr/local/lib/libz.1.dylib, file was built for i386 which is not the architecture being linked (x86_64) 有任何想法吗? 更新 更具体地说,这是在安装nokogiri gem时发生的 并且日志看起来像: xslt_stylesheet.c:127: warning: passing argument 1 of ‘Nokogiri_wrap_xml_document’ with different width due to prototype cc -dynamic -bundle -undefined suppress -flat_namespace -o nokogiri.bundle html_document.o html_element_description.o html_entity_lookup.o html_sax_parser_context.o nokogiri.o xml_attr.o xml_attribute_decl.o xml_cdata.o xml_comment.o xml_document.o xml_document_fragment.o xml_dtd.o xml_element_content.o […]

Ruby 2.1和Nokogiri安装错误?

我知道这是一个在这里已经“解决”了很多次的问题,但是我已经尝试了所有的解决方案,仍然无法让它发挥作用。 这是我的错误: 22-01-14 17:57:56> gem install nokogiri Building native extensions. This could take a while… ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. /Users/josh/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb Extracting libxml2-2.8.0.tar.gz into tmp//ports/libxml2/2.8.0… OK Running ‘configure’ for libxml2 2.8.0… ERROR, review ‘tmp//ports/libxml2/2.8.0/configure.log’ to see what happened. *** extconf.rb failed *** Could not create Makefile due to […]

Shoes.rb可以创建自包含的应用程序吗?

令人鼓舞的是,Shoes(Ruby GUI框架)具有出色的打包function,但我担心它实际上并没有“围绕”创建的应用程序。 OSX的包装在.app系统中输出鞋子安装程序和鞋子文件。 鞋有什么方法可以创造一个包含鞋子的.app – 这不会让你安装鞋子来运行它吗? 我正在创建一个小应用程序 – 只是一个启动按钮和一个子进程的停止按钮等。

gem install autotest-fsevent在更新到macosx mavericks后失败

更新到Maveriks后安装gem autotest-fsevent遇到问题 这是我得到的错误; Mellon:public lasdolphin$ sudo gem install autotest-fsevent Building native extensions. This could take a while… ERROR: Error installing autotest-fsevent: ERROR: Failed to build gem native extension. /Users/lasdolphin/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb extconf.rb:24:in `’: Darwin 13 is not (yet) supported (RuntimeError) Gem files will remain installed in /Users/lasdolphin/.rvm/rubies/ruby-1.9.3- p448/lib/ruby/gems/1.9.1/gems/autotest-fsevent-0.2.8 for inspection. Results logged to /Users/lasdolphin/.rvm/rubies/ruby-1.9.3- p448/lib/ruby/gems/1.9.1/gems/autotest-fsevent-0.2.8/ext/fsevent/gem_make.out 知道为什么会这样吗?

清洁平板安装导轨

父亲,我做了很糟糕的事情。 我完全搞砸了我的系统。 当我试图让Rails使用我的MAMP PRO使用的相同MySQL时,这一切都开始了。 (我仍然没有让他们一起工作)。结果很糟糕,而且情况越来越糟。 最新的错误消息: ➜ ~ rails /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs’: Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError) from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec’ from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem’ from /Users/hb/.rvm/gems/ruby-1.9.3-p0/bin/rails:18:in `’ 所以我决定,我应该只是清理我的RVM和Rails安装的系统,然后以一种正确的方式重新安装所有东西(目前我已经尝试了不同的方法,包括安装rails gem作为sudo,没有sudo ,以及RVM)。 这一切都很混乱,我不知道我是怎么把它拉下来的(把一切搞得一团糟)。 无论如何 – 有人可以告诉我如何对所有gem进行干净擦拭,因此我的系统上不会有任何轨道痕迹,因此我可以执行全新安装。 此外,在Mac OS X Lion上安装rails的最佳方法是什么。 如果我打算只使用最新版本的Ruby和Rails,我应该或不应该使用RVM? 如果我要使用rvm,我不想忘记系统中的gem,因为偶尔使用sudo时会遇到问题。 我认为最好只有一个就是这样。 干杯。

mac上安装pg -v 0.12.2错误

我是编程世界的新手,我有点时间用ruby on rails解决捆绑错误。 我正在运行OSX 10.9.1,RVM用于Ruby管理,我使用的是ruby 2.1.1。 我收到的错误是: Gem :: Ext :: BuildError:错误:无法构建gem原生扩展。 /Users/Removed/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb检查pg_config …否否pg_config …尝试无论如何。 如果构建失败,请使用–with-pg-config = / path / to / pg_config重试 检查libpq-fe.h …没有 找不到’libpq-fe.h标头 * extconf.rb失败* 由于某些原因无法创建Makefile,可能缺少必要的库和/或标头。 检查mkmf.log文件以获取更多详细信息。 您可能需要配置选项。 extconf失败,退出代码1 Gem文件将保留在/Users/Removed/.rvm/gems/ruby-2.1.1/gems/pg-0.12.2中以供检查。 结果记录到/Users/Removed/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-13/2.1.0/pg-0.12.2/gem_make.out安装pg时出错(0.12.2 ),而Bundler无法继续。 经过一番研究后,我下载了Postgres App并将其放入Application目录。 看来我仍然有一个标题问题,所以我尝试尝试指定应用程序的include目录。 仍然没有决议。 我也遇到过一些与自制软件相关的资料,但我不知道如何在这里设置。 如果我能得到一些帮助整理出来,将不胜感激。 先感谢您。 编辑: rvm信息: ruby2.1.1: system:uname:“Darwin christohersmini 13.0.0 Darwin Kernel Version 13.0.0:Thu Sep 19 […]

安装Sqlite3 for Ruby(Mac OSX 10.5.8)

我正在遵循本指南ATM – http://guides.rubyonrails.org/getting_started.html#getting-up-and-running-quickly-with-scaffolding 在尝试创建数据库时,我得到了: Morgans-Computer:博客Morgan $ rake db:create无法在Gemfile中列出的任何gem源中找到gem’sqlite3(> = 0)’。 运行bundle install以安装缺少的gem。 当我尝试运行’bundle install’时,我收到更多错误: 安装带有本机扩展的sqlite3(1.3.4)/Users/Morgan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:在`rescue in build_extensions中的块’:错误:无法构建gem原生扩展。 (gem::安装:: ExtensionBuildError) /Users/Morgan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 我曾尝试安装Ruby Gem Sqlite3(http://rubygems.org/gems/sqlite3-ruby),但它仍然失败。 我在这里发现另一篇post说我需要安装C,因为这是编译器编写的内容? 不确定这究竟意味着什么,或者我是如何去做的。 任何帮助将不胜感激!!

irb中的单词边界

我在Snow Leopard上使用终端。 在命令行,如果我输入foo.bar.baz.bang.quuz.quux ,当我点击选项-B时,它会逐字地向后移动光标 – 在每个句点停止,因为它考虑了一个周期到是一个词边界。 同样,选项-F逐字逐句前进。 在irb(0.9.5,ruby 1.8.7)中,选项-B和-F也有此行为,但句点不再被视为单词边界,这使得这些键盘快捷键显着减少了用处。 我怎么能改变这个? 编辑:Curiouser和curiouser:在具有相同irb和ruby版本的EC2实例上,句点被视为单词边界。