Tag: macos

custom_require.rb:36:在`require’中:没有要加载的文件 – myapp(LoadError)

我得到上面的错误,我所做的就是安装rvm并从mac获得的默认ruby更新到ruby 1.9.2。 我所有的gem出现在gem列表中,但是我需要在某处指定路径吗? 干杯, glenno。

无法在Ruby 1.9.3 IRB中输入变音符号

我在使用Mac OS 10.7.3的Ruby 1.9.3的IRB中遇到了非常奇怪的行为当我尝试进入变音符号时,它在提示符中被转义并且看起来像这样(我在键盘上输入”ü” ) irb(main):001:0> “\U+FFC3\U+FFBC” 这有点奇怪: irb(main):001:0> “\U+FFC3\U+FFBC”.length => 0 当然,角色也不会显示: irb(main):001:0> “\U+FFC3\U+FFBC” => “” 有谁知道这里发生了什么或如何解决这个问题?

在创建回购时无法加载gemcocoa豆荚

rubygems / dependency.rb:296:在`to_specs’中:找不到35个gem中的’cocoapods’(> = 0)(Gem :: LoadError) 来自/Users/divyam.shukla/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/dependency.rb:307:in`to_spec’ from /Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem’ from /Users/user/.rvm/gems/ruby-2.0.0-p247/bin/pod:22:in `’ 我收到了这个错误。

优胜美地升级破坏了ruby.h

自从升级到Yosemite后,我在尝试构建包含ruby.h任何内容时遇到此错误: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:10: fatal error: ‘ruby/config.h’ file not found #include “ruby/config.h” ^ 1 error generated. make[1]: *** [objects/if_ruby.o] Error 1 make[1]: *** Waiting for unfinished jobs…. make: *** [first] Error 2 当然,/ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/config.h确实缺少/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/config.h 。 $ ls -laF /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ total 72 drwxr-xr-x 21 root wheel 714 Jul 29 21:56 ./ drwxr-xr-x 5 […]

缺少mysql.h …(Ruby on Rails,OSX)

我尝试了几个想法……它们都没有用……我只是想安装mysql2作为gem。 我的mysql正在工作,但每次我的系统说,mysql.h都丢失了……有人有想法吗? 现在非常令人沮丧…… 我正在使用osx 10.8.3,ruby 1.9.3,rails 3.2.13和home-brew。 gem install mysql2 -v ‘0.3.11’ Building native extensions. This could take a while… ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/gadreel/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb checking for rb_thread_blocking_region()… yes checking for rb_wait_for_single_fd()… yes checking for mysql.h… no checking for mysql/mysql.h… no —– mysql.h is missing. please check […]

我应该学习MacRuby还是RubyCocoa

我想用ruby学习mac开发但是我不确定要去哪一个。 RubyCocoa已经存在了很长时间,但我认为MacRuby将在长期内击败它。 有什么建议??

无法安装do_mysql gem?

我正在尝试在我的Snow Leopord系统Macbook Pro 13上安装do_mysql,但我不断收到此错误: n216-160:~ myself$ sudo gem1.9 install do_mysql Password: Building native extensions. This could take a while… ERROR: Error installing do_mysql: ERROR: Failed to build gem native extension. /opt/local/bin/ruby1.9 extconf.rb checking for mysql_query() in -lmysqlclient… no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries […]

如何在OSX上卸载rbenv?

如何在OSX上卸载rbenv? 我的rbenv版本搞砸了, brew uninstall rbenv无效,因为brew依赖ruby。

在RVM环境中的Ruby cron作业中找不到Gem

我正在尝试在RVM环境中运行10.5的旧PPC机器上运行一个简单的ruby脚本。 搜索SO,我按照这篇文章中选择的答案。 这是cron中的一行: SHELL=/bin/bash 00 * * * * BASH_ENV=~/.bash_profile && /bin/bash -c ‘~/deggy/onlineGW.rb’ 这个命令在用户山姆根的Bash中运行良好。 这是我脚本的重要部分: #!/usr/bin/env ruby require ‘open-uri’ require ‘nokogiri’ … 这是来自cron的错误输出: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: X-Cron-Env: Date: Mon, 6 Jan 2014 03:15:00 -0600 (CST) /Users/sam/deggy/onlineGW.rb:3:in `require’: no such file to load — nokogiri (LoadError) 好的,因为我正在运行RVM,我已将默认ruby设置为1.9.3,如上所述,该命令在终端中执行,但不在cron中执行。 还有其他环境吗? 很明显,我忽略了一些东西。 山姆,请帮我看看

在osx上安装pg gem时出错

我在osx 10.6.7尝试在新的rails 3.0.7应用程序上运行bundle install,并且在尝试构建pg gem时它仍然失败。 它一直告诉我,我需要开发人员工具。 但据我所知,我已经安装了开发人员工具。 这是xcodebuild -version的输出 Xcode 3.2.6 Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 BuildVersion: 10M2518 这是失败的pg gem构建的输出 /Users/bm/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb –with-pg-config=/Library/PostgreSQL/8.4/bin/pg_config Using config values from /Library/PostgreSQL/8.4/bin/pg_config checking for libpq-fe.h… *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more […]