Infinitely loading gem (requires subgems) - ruby

I'm sorry for the title, as I'm really not sure how to describe it. Basically, I have a set of gems I built, named conventionally as "mygems-gem1", "mygems-gem2", etc.
I decided it would be a lot easier if I made another gem, "mygems", that would require all of the child gems (i.e. "mygems-gem1", etc).
I tried this, built and installed the gem, and loaded up IRB. But, requiring "mygems" now just sits forever and never loads anything. Seems like a dependency conflict, maybe?
What's really strange is that I can load up IRB and require the child gems by hand and that works perfectly.
What gives?
EDIT: Letting it continue running, it never raises an error. I don't know if this is of any help, but upon CTRL+Cing out, I get this stack trace:
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `call'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `block (2 levels) in contains_requirable_file?'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `each'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `any?'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `block in contains_requirable_file?'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `each'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `any?'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `contains_requirable_file?'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:951:in `block (2 levels) in find_in_unresolved_tree'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2397:in `[]'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2397:in `block (2 levels) in traverse'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2396:in `each'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2396:in `block in traverse'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2395:in `each'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2395:in `traverse'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2398:in `block (2 levels) in traverse'
... 17 levels...
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:93:in `require'
from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/method_source-0.8.2/lib/method_source.rb:7:in `<top (required)>'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/pry-0.10.1/lib/pry.rb:124:in `<top (required)>'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/mygems-gem1-0.12.8/lib/mygems/gem1.rb:2:in `<top (required)>'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/mygems-0.0.1/lib/mygems.rb:3:in `<top (required)>'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from (irb):1
from /home/kinginky/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'

I tried this, built and installed the gem, and loaded up IRB.
You don't need to build a gem for that. What if you just make a ruby script with
require "mygems-gem1"
require "mygems-gem2"
...
And require that? Does that work?

Related

rspec gets "undefined method `build_rb_world_factory' for nil"

I'm updating a Rails 3.2 app to Ruby 2.2.2. I've pulled the Rails version up to 3.2.22, which is necessary for Ruby 2.2.2. That went relatively well but prompted a Cucumber update, from 1.2.1 to 1.3.20. (I don't recall the details, because that was several failed efforts ago, but I think my features were passing but then exiting false before I did this.)
Now Cucumber features run fine (albeit with a ton of unrelated Ruby 2.2.2 warnings), but rspec does not. Specifically, when I run rake spec I get this error:
/path/to/gems/cucumber-1.3.20/lib/cucumber/rb_support/rb_dsl.rb:15:in `build_rb_world_factory': undefined method `build_rb_world_factory' for nil:NilClass (NoMethodError)
The stack trace leads through Capybara (2.4.4, pinned for other reasons), ActiveSupport, and Bundler back up to rspec-core.
All my searches trying to find similar issues just lead to the code, because it seems like the only place this method name exists is in code.
Why am I getting this error from Capybara/Cucumber when running rspec? How can I fix it?
ETA: Stack trace, with paths condensed a bit:
/path/to/gems/cucumber-1.3.20/lib/cucumber/rb_support/rb_dsl.rb:15:in `build_rb_world_factory': undefined method `build_rb_world_factory' for nil:NilClass (NoMethodError)
from /path/to/gems/cucumber-1.3.20/lib/cucumber/rb_support/rb_dsl.rb:50:in `World'
from /path/to/gems/capybara-2.4.4/lib/capybara/cucumber.rb:4:in `<top (required)>'
from /path/to/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
from /path/to/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require'
from /path/to/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
from /path/to/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
from /path/to/gems/capybara-screenshot-0.2.2/lib/capybara-screenshot.rb:96:in `<top (required)>'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
from /path/to/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
from /path/to/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from /path/to/app/config/application.rb:13:in `<top (required)>'
from /path/to/app/config/environment.rb:2:in `require'
from /path/to/app/config/environment.rb:2:in `<top (required)>'
from /path/to/app/spec/spec_helper.rb:10:in `require'
from /path/to/app/spec/spec_helper.rb:10:in `<top (required)>'
from /path/to/app/spec/controllers/academic_years_controller_spec.rb:1:in `require'
from /path/to/app/spec/controllers/academic_years_controller_spec.rb:1:in `<top (required)>'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
from /path/to/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
from /path/to/gems/rspec-core-3.2.3/exe/rspec:4:in `<main>'
/path/to/ruby/ruby-2.2.2/bin/ruby -I/path/to/gems/rspec-core-3.2.3/lib:/path/to/gems/rspec-support-3.2.2/lib /path/to/gems/rspec-core-3.2.3/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
My hunch is that there's a configuration file which needs to be rebuilt somewhere.
From your stacktrace - the capybara-screenshot gem is requiring capybara/cucumber even though you're running specs which aren't using cucumber. This means World is called from capybara/cucumber against a non-initialized cucumber, and gives the error. The version of capybara-screenshot you're using is really old, and the code that required capybara/cucumber has since been removed so you should probably update the version of capybara-screenshot you're using, and add
require 'capybara/cucumber'
require 'capybara-screenshot/cucumber'
to your env.rb or other cucumber support file

"bundle exec rake test" is pending

When I run bundle exec rake test under my application, It's pending forever. And then I entered Ctrl-c to stop it. Then it gives these message:
^C/home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:54:in `gets': Interrupt
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:54:in `verify_server_version'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/run.rb:25:in `call'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/ishamo/.rvm/gems/ruby-2.2.1/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/ishamo/ra/sample_app/bin/spring:13:in `require'
from /home/ishamo/ra/sample_app/bin/spring:13:in `<top (required)>'
from bin/rake:3:in `load'
from bin/rake:3:in `<main>'
rake aborted!
Interrupt:
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:401:in `system'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:401:in `block in load_schema_if_pending!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:398:in `load_schema_if_pending!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:411:in `block in maintain_test_schema!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:642:in `suppress_messages'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:416:in `method_missing'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.5/lib/active_record/migration.rb:411:in `maintain_test_schema!'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_help.rb:19:in `<top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/home/ishamo/ra/sample_app/test/test_helper.rb:3:in `<top (required)>'
/home/ishamo/ra/sample_app/test/controllers/static_pages_controller_test.rb:1:in `require'
/home/ishamo/ra/sample_app/test/controllers/static_pages_controller_test.rb:1:in `<top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `require'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `block (3 levels) in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `each'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:114:in `block (2 levels) in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:113:in `each'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:113:in `block in define'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/sub_test_task.rb:20:in `invoke_rake_task'
/home/ishamo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/test_unit/testing.rake:8:in `block in <top (required)>'
/home/ishamo/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/home/ishamo/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => test:run
(See full trace by running task with --trace)
I am a beginner. Would you please tell me how to do it? Appreciate.
I have sometimes noticed this problem myself also, where the console hangs because an issue in Rails Spring. Spring is a Rails application preloader, designed to make developing and testing a Rails application faster.
Try running:
spring stop
or:
bin/spring stop
..and then try again.
If that doesn't help then comment out the line in your Rakefile that says:
# Spring speeds up development by keeping your application running
# in the background. Read more: https://github.com/rails/spring
gem 'spring'
This will disable Spring altogether. Rails will start a little slower (no in-memory preloading), but you will avoid the hanging issue.
This issue seems to have been discussed previously on GitHub here:
https://github.com/rails/spring/issues/265

Fail to run rails server

I cannot run my rails server. I used rails on windows 64 bit. When i run
rails server
I get the following results:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15/lib/mysql2.rb
:8:in `require': 193: %1 is not a valid Win32 application. - C:/RailsInstaller
/Ruby1.9.3/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/mysql2-0.3.15/mysql2
/mysql2.so (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15/
lib/mysql2.rb:8:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/
lib/bundler.rb:132:in `require'
from C:/Users/azlan187/Sites/simple_cms/config/application.rb:7:in `<top
(required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2
/lib/rails/commands.rb:74:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2
/lib/rails/commands.rb:74:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2
/lib/rails/commands.rb:71:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2
/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I absolutely don't know how to fix this. Any help would be really appreciated!
ps: please tell me if i need to provide more info. Thanks.
Are you using a 64-bit system? The first line of your error output complains about mysql.so not being a valid Win32 application. I would start investigating on that, and if it does not yield anything, try googling for "mysql gem errors". I personally had a lot of problems getting the mysql gem to work on windows, andfrom my past experience, usually it is a matter of sourcing the correct libmysql file.

rake gitlab:setup fails on RHEL 5 with a compiled version of libicu

So I'm totally a Rails newbie. And this might be more of a linux question... Since the issue seems to revolve around libicu-devel and the charlock_holmes gem.
I've been following these too guides primarily (along with Google searches of course). I've got Rails 4 on Ruby 2 from RVM. And it's a RHEL5 install at Rackspace (dedicated).
https://github.com/gitlabhq/gitlabhq/blob/5-4-stable/doc/install/installation.md
http://blog.lsong.org/2013/07/install-gitlab-on-centos-6/
After having a few issues along the way I thought I was making progress until I got to grabbing packages from yum and the fact that there doesn't seem to be a package of libicu past 3.6 anywhere. I compiled that from source and everything seemed to install OK. The charlock_holmes gem was added.
But then after adding the DB stuff for GitLab I went to initialize things and can't go any further and now I have no idea what to do. I've found references to other errors at this point but they're usually from the DB not being setup properly so they're not helpful.
Anyone with more Rails experience than me know what I can do next?
rvmsudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
rake aborted!
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so: undefined symbol: _ZN7icu_4_28ByteSink15GetAppendBufferEiiPciPi - /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes.rb:1:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab-grit-2.5.1/lib/grit.rb:79:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab_git-1.3.0/lib/gitlab_git.rb:4:in `<top (required)>'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/jharvey/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/git/gitlab/config/application.rb:9:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
(See full trace by running task with --trace)
Let me know if I need to add more information. I tried adding the --trace flag and got the same output. I'm guessing on the libicu/charlock_holmes being the problem since it's the first message after rake aborted!.
My company won't spring for anything like Github enterprise and I was hoping to build a subdomain with some tools to share code with our numerous divisions. At the rate I'm going I might as well write a new app from scratch. Thanks in advance!
Update: Ran :check with --trace and noticed while most of it was the same, there were a few extra lines at the end.
Update 2: Tried the two suggestions. Switched to 1.9.3 and ran the bundle config command (no output). Ran trace again, and here's the result.
rvmsudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production --trace
rake aborted!
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so: undefined symbol: _ZN7icu_4_28ByteSink15GetAppendBufferEiiPciPi - /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support /dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes.rb:1:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab-grit-2.5.1/lib/grit.rb:79:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/gitlab_git-1.3.0/lib/gitlab_git.rb:4:in `<top (required)>'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/jharvey/.rvm/gems/ruby-1.9.3-p448#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/git/gitlab/config/application.rb:9:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Update 3: Making progress. I seem to have successfully got everything installed after messing around with redis for a bit. I can check the "env:info" successfully. However now I try and get gitlab online using init.d and it's not working. =/ There was no init script after install so I grabbed one from gitlabhq per this post, GitLab installation on linux (using 5-4 like my install). That script results in:
/etc/init.d/gitlab start
bash: bundle: command not found`
We'll see if I can sort that out. I welcome any help.
Update 4: Sorted that out. RVM couldn't be seen by the git user. Haven't tested every aspect of the system but I now have GitLab running on a git subdomain. Don't have a specific answer to the original question. But I seem to have gotten to the end of the journey. crosses fingers
For me, this was an LDD issue. On my system, headers for libicui18n were installed, while both libicui18n.so.36 and libicui18n.so.42 were installed.
Validate this with
ldd vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/charlock_holmes-{YOUR VERSION HERE}/charlock_holmes/charlock_holmes.so
Look for the line
libicui18n.so.## => ...
If ## is 36, then bundler's linking against the wrong version (it should be 42). Bundler seemed to be disregarding the --with-icu-dir flag. Not sure why.
My fix was to use gem to compile charlock_holmes
gem install charlock_holmes -v '0.6.9.4' -- --with-icu-dir=[...]
where [...] was the path to the lib directory in which icu 42 was installed. Then I just copied the generated binary (charlock_holmes.so) over the one produced by bundler.

Error trying to use image_science in a rails project on ubuntu 12.04

I have a rails 3.0.20 app running with rvm on ruby 1.9.3p327. My Gemfile reads:
gem 'image_science', :git => 'git://github.com/asynchrony/image_science.git'
and Gemfile.lock has its version as:
remote: git://github.com/asynchrony/image_science.git
revision: dc36ddaadc46aecdef907de3c41a9d14d28ba8d8
specs:
image_science (1.3.2.1.Asynchrony)
I cannot seem to start my app without removing image_science, since I keep getting this error:
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require': iconv will be deprecated in the future, use String#encode instead.
rake aborted!
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE - /home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science/extension.so
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/umar/gems/ruby/1.9.1/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
/home/umar/gems/ruby/1.9.1/bundler/gems/image_science-dc36ddaadc46/lib/image_science.rb:3:in `<top (required)>'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
/home/umar/.rvm/gems/ruby-1.9.3-p327#a_proj/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
/home/umar/myprojects/a_proj/config/application.rb:9:in `<top (required)>'
/home/umar/myprojects/a_proj/Rakefile:4:in `require'
/home/umar/myprojects/a_proj/Rakefile:4:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/umar/gems/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `load'
/home/umar/gems/ruby/1.9.1/bin/rake:19:in `<main>'
How can I fix this error.
You may need to install the required libraries (FreeImage and RubyInline) to make ImageScience work. (ImageScience RDoc)
By the way, I assume that you don't use mini_magick or rmagick because you don't have access to an imagemagick or graphicsmagick installation.
Perhaps you should try to use one of these two, because ImageScience has not been updated for a while.
Hope this helps.

Resources