Miega
Miega

Reputation: 45

Ruby cannot find installed gem

I'm doing a tutorial from jumpstartlabs

http://tutorials.jumpstartlab.com/projects/eventmanager.html#iteration:-day-of-the-week-targeting

And after installing sunlight-congress gem, it says it's installed, but when trying to use it in a .rb file I get error

event_manager.rb file:

require 'rubygems'
require 'csv'

require 'sunlight/congress'

 require 'sunlight-congress'

and when I try to launch it through the console:

d:\Sites\TOP\event_manager\lib>event_manager.rb
d:/program files/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:
    55:in `require': cannot load such file -- sunlight/congress (LoadError)
    from d:/program files/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kerne
    l_require.rb:55:in `require'
    from D:/Sites/TOP/event_manager/lib/event_manager.rb:3:in `<main>'

my ruby env:

d:\Sites\TOP\event_manager\lib>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.2
- RUBY VERSION: 2.0.0 (2013-05-14 patchlevel 195) [i386-mingw32]
- INSTALLATION DIRECTORY: d:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: d:/RailsInstaller/Ruby2.0.0/bin/ruby.exe
- EXECUTABLE DIRECTORY: d:/RailsInstaller/Ruby2.0.0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
 - d:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0
 - C:/Users/Mie/.gem/ruby/2.0.0
- GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :backtrace => false
 - :bulk_threshold => 1000
 - REMOTE SOURCES:
 - https://rubygems.org/

Why is it not finding the gem inside ruby?

Upvotes: 0

Views: 599

Answers (1)

Anthony
Anthony

Reputation: 15957

Your require statement needs to be:

require 'sunlight-congress'

Upvotes: 1

Related Questions