ruby & gems gem install extension_name


ruby & gems

gem install extension_name -v version
gem uninstall extension_name -v version

I met a problem when I install the mysql
it’s caused by the mysql extension search /usr/local for mysql develop files
ln -s /usr/include/mysql /usr/local/include/
ln -s /usr/lib/mysql /usr/local/lib/

when I started the app that created with ruby
it show the warning:
boot.rb:20:Warning: Gem::SourceIndex#search support for String patterns is deprecated

we can change the boot.rb on line 20
rails_gem = Gem.cache.search(‘rails’, “=#{rails_gem_version}.0″).sort_by { |g| g.version.version }.last
“Gem.cache.search”, just replace “search” with “find_name”.
or changed into
rails_gem = Gem.cache.search(Gem::Dependency.new(‘rails’,“~>#{version}.0”)).sort_by { |g| g.version.version }.last

  1. #1 by I Lost Thirty Póunds in Thirty Days on 2009-05-06 - 18:50

    Hi, interesting post. I have been thinking about this topic,so thanks for sharing. I’ll likely be coming back to your posts. Keep up the good work

(will not be published)