sul-dlss / moab-versioning

Gem to process digital object version content, metadata, and manifests
Other
9 stars 3 forks source link

Need help to use Moab #2

Closed mohideen closed 11 years ago

mohideen commented 11 years ago

I'm sorry, if this is not the right place to ask questions, but I couldn't find a better place.

I read about the Moab design in Code4lib, and got interested to try it out. With my little experience in ruby I gained playing with Hydra, I'm not able to get this to work.

I added this git repo to the Gemfile of my test project as below: gem 'moab-versioning', :git => 'git://github.com/sul-dlss/moab-versioning.git'

The bundle install of my project succeeds, but when I add require 'moab' to a test ruby file (test.rb), and then run "ruby test.rb", it fails with a LoadError

LOG: ruby test.rb ~/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- moab (LoadError) from ~/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 'require' from test.rb:3:in '

'

I would appreciate your help to get this working for me!

moabrichard commented 11 years ago

I am able to reproduce the problem if I give the command "ruby test.rb"

However, if I use the command "bundle exec ruby test.rb" then there is no error

Can you please try that. If it still gives an error, please tell me your version of Ruby if you are using RVM The output of "bundle exec gem list"

mohideen commented 11 years ago

Thanks a lot! It works with bundle exec. I'm a beginner in Ruby and I was not aware bundle exec earlier.