开发者

Why doesn't mysql show up under gem list after installing successfully?

Here's the deal:

$ gem -v

1.3.7  

$ gem env

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-darwin10.4.0]
  - INSTALLATION DIRECTORY: /Users/harriett/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
  - RUBY EXECUTABLE: /Users/harriett/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/harriett/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /Users/harriett/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
     - /Users/harriett/.rvm/gems/ruby-1.9.2-p0@global
  - GEM CONFIGURATION:
  开发者_运维技巧   - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

$ sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config

Building native extensions.  This could take a while...  
Successfully installed mysql-2.8.1  
1 gem installed  

$ gem list mysql

* LOCAL GEMS *  

Why doesn't it show up?

Naturally, when I require "mysql" in a ruby program I get:

`require': no such file to load -- mysql (LoadError)  


Your Ruby install is being managed by RVM. See "DO NOT use sudo..." on the RVM site.

Try installing it without sudo and it should show up in your gemlist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜