问题
Code:
Shoes.setup do
gem 'mechanize'
end
require 'rubygems'
require 'mechanize'
Running Shoes on it says:
no such file to load -- mechanize
Thank you.
回答1:
I did:
sudo gem install mechanize
and the following seems to be working:
Shoes.setup do
gem 'mechanize'
end
require 'mechanize'
It says 'Building native extensions' and is taking forever, but seems to be the norm according to hackety.org.
回答2:
rubygems
needs to be required before any gems.
require 'rubygems'
require 'mechanize'
Shoes.setup do
gem 'mechanize'
end
来源:https://stackoverflow.com/questions/548657/shoes-and-gems