Tag: osx mountain lion

我如何设置heroku postgresql应用程序的路径?

我刚刚安装了heroku PSQL应用程序(v1.0),我无法使用gem pg“0.1.4”连接我的rails应用程序。 我已经将路径PATH =“/ Applications / Postgres.app / Contents / MacOS / bin:$ PATH”添加到我的.profile和我的.bashrc文件中,但似乎没有任何东西允许我只是通过调用“psql”来运行psql。 我成功使用“psql -h localhost”。 当我选择“psql”时,我得到: Is the server running locally and accepting connections on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432”? 我正在使用山狮。

安装ffi(1.1.2)时发生错误,Bundler无法继续

在Rails 3.0项目中运行OSX Mountain Lion。 当尝试使用Rails项目中的bundler更新我的gem时,我得到以下错误: An error occured while installing ffi (1.1.2), and Bundler cannot continue. Make sure that `gem install ffi -v ‘1.1.2’` succeeds before bundling. ERROR: Error installing ffi: ERROR: Failed to build gem native extension. /Users/victorstan/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb checking for ffi.h… *** extconf.rb failed *** Could not create Makefile due to some reason, […]

Mountain Lion上的pg gem’0.14.0’失败了

我刚从OS X Lion升级到OS X Mountain Lion。 我的铁路环境大部分都保持着机智。 我必须做的唯一步骤才能让事情恢复到良好状态: – 安装XCode 4.4 – 安装XCode 4.4命令行工具 – 安装gcc-4.2 一切顺利。 这是问题,当我运行bundle install时几乎所有的gem都安装正确,除了我需要的最重要的一个 – postgresql gem’pg’。 它特别适用于0.12.2以上的版本。 我正在使用ruby 1.9.3p125。 我可以成功地获取0.12.2 pg gem以及下面的版本,但是它们给了我分段错误(我猜是因为我正在使用的ruby版本)。 因此,这让我相信它特定于pg gem,而不是我的整体环境看到其他gem安装正常。 我也尝试重新安装Postgresql以确保我的postgres环境没问题,并且在这方面似乎很好。 有没有人能够安装’pg’gem版0.13.0或更高版本(更优选0.14.X)? 这是我的堆栈跟踪: Building native extensions. This could take a while… ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/caseyli/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb checking […]

安装Ruby 2.0.0后安装Ruby 1.9.3

我安装了gcc-4.2并安装了Ruby 2.0.0,但在这个过程中我删除了一些旧版本的ruby。 具体来说,Ruby 1.9.3,现在我想回去使用rvm install 1.9.3安装该版本但我不断收到错误。 它使用gcc-4.2进行安装,但是gcc-4.2很难安装1.9.3。 现在我处于这种状态,如何安装1.9.3? 有什么想法或建议吗? 这些是错误: Error running ‘__rvm_package_extract /Users/marty/.rvm/archives/yaml-0.1.4.tar.gz /Users/marty/.rvm/src’, please read /Users/marty/.rvm/log/ruby-1.9.3-p392/yaml/extract.log There has been an error while trying to extract the source. Halting the installation. Error running ‘./configure –disable-install-doc –prefix=/Users/marty/.rvm/rubies/ruby-1.9.3-p392 –with-opt-dir=/Users/marty/.rvm/usr –disable-shared’, please read /Users/marty/.rvm/log/ruby-1.9.3-p392/configure.log There has been an error while running configure. Halting the installation. 这是日志 Extract.log […]

警告:Nokogiri是针对LibXML 2.7.3版本构建的,但动态加载了2.7.8

在重新安装Mac OS X 10.8 Mountain Lion之后,安装了Ruby 1.9.3和Ruby on Rails 3.2.6之后,我启动了Rails控制台,并收到了以下警告消息: 警告:Nokogiri是针对LibXML 2.7.3版本构建的,但动态加载了2.7.8 我该如何解决?

无法在Mountain Lion上安装pg gem

升级到Mountain Lion后,我遇到了很多关于Rails的麻烦。 到目前为止,我试图在互联网上搜索这些并搜索几个小时,以确保我的系统具有升级后运行rails的所有依赖关系: 我更新了我的Homebrew安装 我更新了我的RVM安装 我安装了XCode命令行工具 我按照提到安装了GCC 我将我的Ruby版本升级为 ruby 1.9.2p290(2011-07-09修订版32553)[x86_64-darwin10.8.0] 我的Rails版本被validation为Rails 3.2.6 我还发现Mountain Lion与Postgres有一些问题,所以我看到这篇文章 ,发现我需要将这一行添加到我的Bash配置文件中: export PATH=”/usr/local/bin:/usr/bin:$PATH” 现在我转到我升级之前在Snow Leopard上运行正常的Rails应用程序,当我在命令行运行rails s时,我收到以下错误: AM@~/Documents/RailsWS/app0815 >gem install pg Building native extensions. This could take a while… ERROR: Error installing pg: ERROR: Failed to build gem native extension. /Users/AM/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb checking for pg_config… yes Using config values from /usr/bin/pg_config checking […]

Mountain Lion安装rvm ree-1.8.7

我尝试了这个其他答案 ,但我遇到了以下问题: $ export CPPFLAGS=-I/opt/X11/include $ CC=/usr/local/bin/gcc-4.2 rvm reinstall ree-1.8.7 /Users/username/.rvm/src/ree-1.8.7-2012.02 has already been removed. /Users/username/.rvm/rubies/ree-1.8.7-2012.02 has already been removed. No binary rubies available for: osx/10/x86_64/ree-1.8.7-2012.02. Continuing with compilation. Please read ‘rvm mount’ to get more information on binary rubies. You requested building with ‘/usr/local/bin/gcc-4.2’ but it is not in your path. 还有别的我做错了吗? 我正在使用Apple发布的十月发布的命令行工具,如果这有帮助…

无法使用rvm在Mountain Lion上安装Ruby

尝试使用rvm在Mountain Lion上安装Ruby,但收到此错误消息: ruby-1.9.3-p362 – #extracted to /usr/local/rvm/src/ruby-1.9.3-p362 ruby-1.9.3-p362 – #configuring Error running ‘env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure –enable-shared –disable-install-doc –prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 –with-opt-dir=/usr/local/rvm/usr’, please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log There has been an error while running configure. Halting the installation. ruby-1.9.3-p362 is not installed. Creating alias default for ruby-1.9.3-p362. Recording alias default for ruby-1.9.3-p362. Creating default links/files ruby-1.9.3-p362 is not […]

ln:/usr/lib/libmysqlclient.18.dylib:文件存在

rake aborted! dlopen(/Users/ava/.rvm/gems/ruby-2.0.0-p247/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/lib/libmysqlclient.18.dylib Referenced from: /Users/ava/.rvm/gems/ruby-2.0.0-p247/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle Reason: image not found – /Users/ava/.rvm/gems/ruby-2.0.0-p247/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle` 如下解决: $ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib \ /usr/lib/libmysqlclient.18.dylib ln: /usr/lib/libmysqlclient.18.dylib: File exists 我的设置: OSX 10.8.4 MySQL 5.1.71 libmysqlclient.16.dylib $ locate libmysqlclient.16.dylib /usr/lib/libmysqlclient.16.dylib /usr/local/Cellar/mysql51/5.1.71/lib/mysql/libmysqlclient.16.dylib libmysqlclient.18.dylib $ locate libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib 在.bash_profile ,我有 export PATH=”/usr/local/bin:$HOME/.rvm/bin:$HOME/bin:$PATH” export DYLD_LIBRARY_PATH=/usr/local/bin/mysql 如何让这个耙子运行? 我应该在/usr/local/Cellar/mysql51/5.1.71/lib/mysql下有libmysqlclient.18.dylib吗? 如果是,我该如何创建它?

Ruby 2.0.0 RVM无法编译OS X 10.8.2 Mountain Lion

尝试使用RVM安装它我收到以下错误: > [2013-02-25 10:09:24] make CC = /usr/local/bin/gcc-4.2 LD = ld > LDSHARED = /usr/local/bin/gcc-4.2 -dynamic -bundle CFLAGS = -O3 > -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 > -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include […]