Created
July 5, 2012 14:29
-
-
Save pachun/3054011 to your computer and use it in GitHub Desktop.
trouble creating a gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My directory structure is this: | |
| - rest-in-motion.gemspec | |
| - /lib | |
| - rest-in-motion.rb | |
| - /rest-in-motion | |
| | |
| - 5 .rb files that make up the gem | |
The contents of rest-in-motion.gemspec are: | |
Gem::Specification.new do |s| | |
s.name = 'rest-in-motion' | |
s.version = '0.0.4' | |
s.date = '2012-06-23' | |
s.summary = 'Object mapping.' | |
s.description = 'Object mapping layer atop RestKit\'s RKClient.' | |
s.authors = ['Nick Pachulski'] | |
s.email = '[email protected]' | |
s.files = ['lib/rest-in-motion'] | |
s.homepage = 'http://nickpachulski.com/' | |
end | |
and the contents of rest-in-motion.rb are: | |
unless defined?(Motion::Project::Config) | |
raise "This file must be required within a RubyMotion project Rakefile." | |
end | |
Motion::Project::App.setup do |app| | |
Dir.glob(File.join(File.dirname(__FILE__), 'rest-in-motion/*.rb')).each do |file| | |
app.files.unshift(file) | |
end | |
end | |
And I build with: | |
gem build rest-in-motion.gemspec | |
Which builds successfully all fine and good, and I can then do a: | |
gem install ./rest-in-motion-0.0.4.gem | |
But I can never do a require in IRB or PRY without getting: | |
1.9.3 (main):0 > require 'rest-in-motion' | |
LoadError: cannot load such file -- rest-in-motion | |
from /Users/pachun/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment