开发者

Installing a forked github gem of Toto

Ok, this is probably simple, but I'm having a bit of a pain trying to get it to work.

So I was using the gem "Toto", which I installed using "sudo gem install toto", but I recently found a fork of the gem I would rather use here https://github.com/evaryont/toto.

I tried specifying the gem url with --source, but I guess github doesn't support gems anymore aside from "the list". I then tried downloading the forked source and running "rake build" and "rake install" which seemed to create a gem just fine, but when I plug it back into the same appl开发者_高级运维ication which comes with the gem, it fails to load.

It dies like this.

    computer:myblog User$ thin start -R config.ru
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- toto (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from config.ru:2
    from /Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/builder.rb:51:in `instance_eval'
    from /Library/Ruby/Gems/1.8/gems/rack-1.3.0/lib/rack/builder.rb:51:in `initialize'
    from config.ru:1:in `new'
    from config.ru:1

Sample Toto Application

git clone git://github.com/cloudhead/dorothy.git myblog

I'm also a little discouraged about building the gem like this because I'm hosting on Heroku, and I would like to make sure that I can use this gem on there as well. I suppose I may have to unpack this gem and commit it to my source?


Update

I also tried using bundler with the following in my Gemfile, and I get the same error, would this mean its just an incompatibility in the sample code and the forked gem?

gem "toto", :git => "git://github.com/evaryont/toto.git"


Are you running in a context where the gem exists? Bundler handles :git-installed gems by cloning the source and storing it in a special directory for bundled gems. It's not actually installed to your system, and won't run unless bundler is running first.

Try this:

bundle exec thin start -R config.ru
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜