2012-06-07 4 views
1

sinbook gem을 포크하고 gem repo를 내 Gemfile에 추가했습니다. 그러나 sinbook에 의존하는 sinatra-authentication gem은 Gem :: LoadError를 던집니다.Gem 파일에서 git repo를 사용할 때 Gem :: LoadError

보석의 my version이 사용되지 않는 이유는 무엇입니까?

Gemfile

source :rubygems 

gem 'sinatra' 
gem 'sinatra-contrib' 
gem 'sequel' 

gem 'jruby-openssl' 
gem 'rack-flash' 
gem 'sinbook', git: 'https://github.com/JamesGecko/sinbook' 
gem 'sinatra-authentication' 

gem 'json-jruby' 

gem 'coffee-script' 
gem 'therubyrhino' 

오류

PS C:\users\james\code\portal> jruby -S bundle 
Fetching gem metadata from http://rubygems.org/........ 
Fetching gem metadata from http://rubygems.org/.. 
Fetching https://github.com/JamesGecko/sinbook 
Installing addressable (2.2.8) 
Installing backports (2.5.1) 
Installing bouncy-castle-java (1.5.0146.1) 
Installing coffee-script-source (1.3.1) 
Installing multi_json (1.2.0) 
Installing execjs (1.3.0) 
Installing coffee-script (2.2.0) 
Installing dm-core (1.2.0) 
Installing dm-migrations (1.2.0) 
Installing dm-timestamps (1.2.0) 
Installing dm-validations (1.2.0) 
Installing eventmachine (0.12.10) 
Installing jruby-openssl (0.7.7) 
Installing json (1.5.0) 
Installing json-jruby (1.5.0) 
Installing rack (1.4.1) 
Installing rack-flash (0.1.2) 
Installing rack-protection (1.2.0) 
Installing rack-test (0.6.1) 
Installing rufus-tokyo (1.0.7) 
Installing sequel (3.34.1) 
Installing tilt (1.3.3) 
Installing sinatra (1.3.2) 
Using sinbook (0.1.9.jamesgecko) from https://github.com/JamesGecko/sinbook (at master) 
Installing sinatra-authentication (0.4.1) 
Installing sinatra-contrib (1.3.1) 
Installing therubyrhino (1.73.2) 
Using bundler (1.1.4) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. 
PS C:\users\james\code\portal> jruby .\app.rb 
Gem::LoadError: Could not find sinbook (>= 0) amongst [addressable-2.2.8, backports-2.5.1, bouncy-castle-java-1.5.0146.1, bundler-1.1.4, coffee-script-2.2.0, coffee-script-source-1.3.1, dm-core-1.2.0, dm-migrations-1.2.0, dm-timestamps-1.2.0, dm-validations-1.2.0, eventmachine-0.12.10-java, execjs-1.3.0, jruby-openssl-0.7.7, jruby-win32ole-0.8.5, json-1.5.0-java, json-jruby-1.5.0-java, multi_json-1.2.0, rack-1.4.1, rack-flash-0.1.2, rack-protection-1.2.0, rack-test-0.6.1, rake-0.9.2.2, rufus-tokyo-1.0.7, sequel-3.34.1, sinatra-1.3.2, sinatra-authentication-0.4.1, sinatra-contrib-1.3.1, therubyrhino-1.73.2, tilt-1.3.3] 
       to_specs at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/dependency.rb:247 
    activate_dependencies at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:777 
        each at org/jruby/RubyArray.java:1611 
    activate_dependencies at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:766 
       activate at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/specification.rb:750 
      try_activate at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems.rb:212 
       require at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:59 
       require at c:/dev/jruby-1.7.0.preview1/lib/ruby/shared/rubygems/custom_require.rb:55 
       (root) at .\app.rb:7 

app.rb

require 'sinatra' 
require 'sinatra/reloader' 
require 'json' 

require 'digest/sha1' 
require 'rack-flash' 
require 'sinatra-authentication' 

use Rack::Session::Cookie, secret: 'foobar' 
use Rack::Flash 

# ... 

답변

1

app.rb.하는 require "bundler/setup" 추가 번들 된 환경을로드해야했습니다. 더 많은 정보는 the bundler documentation에서 찾을 수 있습니다.

Sinatra를 사용하고 있으므로 using config.ru을 살펴볼 수도 있습니다.