Skip to content

Instantly share code, notes, and snippets.

@drewchandler
Created September 19, 2010 20:10
Show Gist options
  • Save drewchandler/587079 to your computer and use it in GitHub Desktop.
Save drewchandler/587079 to your computer and use it in GitHub Desktop.
$ cat test.rb
require 'rubygems'
require 'bundler'
Bundler.setup
Bundler.require(:default)
puts ImageScience
$ ruby test.rb
/Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/RubyInline-3.8.6/lib/inline.rb:513:in `load': require on /Users/drew/.ruby_inline/Inline_ImageScience_cdab.bundle failed (LoadError)
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/RubyInline-3.8.6/lib/inline.rb:829:in `inline'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/bundler/gems/image_science-a6001f8/lib/image_science.rb:89:in `<class:ImageScience>'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/bundler/gems/image_science-a6001f8/lib/image_science.rb:12:in `<top (required)>'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `each'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `block in require'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `each'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `require'
from /Users/drew/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0.rc.5/lib/bundler.rb:107:in `require'
from test.rb:5:in `<main>'
@trevorturk
Copy link

I'm using this Gemfile:

source 'http://rubygems.org'
gem 'image_science'
gem 'RubyInline'

@dzsodzso63
Copy link

did u find some solution?

@thiagodiniz
Copy link

any solution?

@dzsodzso63
Copy link

I've got one, I made an initializer as:

class Inline::C
def load
require "#{so_name}"
#below is the original version which breaks
#require "#{so_name}" or raise LoadError, "require on #{so_name} failed"
end
end

@thiagodiniz
Copy link

i have tried this but it failed. this was my error:

.../config/initializers/hack.rb:1: uninitialized constant Inline (NameError)
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/engine.rb:201
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/engine.rb:200:in each' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/engine.rb:200 from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:ininstance_exec'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:25:in run' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:50:inrun_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:in each' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/initializable.rb:49:inrun_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:134:in initialize!' from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:insend'
from /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in method_missing' from /Users/thiago/Documents/workspaces/sources/Agenda/config/environment.rb:5 from /Users/thiago/Documents/workspaces/sources/Agenda/config.ru:3 from /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:ininstance_eval'
from /Library/Ruby/Gems/1.8/gems/rack-1.2.2/lib/rack/builder.rb:46:in initialize' from /Users/thiago/Documents/workspaces/sources/Agenda/config.ru:1:innew'
from /Users/thiago/Documents/workspaces/sources/Agenda/config.ru:1

@dzsodzso63
Copy link

In my Gemfile:

gem "RubyInline", :require => "inline"
gem "g1nn13-image_science", :require=>false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment