problem with running ruby application - ruby

I am using RubyMine on windows so I can run a given ruby on rails application. When I click run I get the following error:
C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails" server -b 127.0.0.1 -p 3000 -e development
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:7:in `require': 126: The specified module could not be found. - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:7:in `rescue in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/config/application.rb:7:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails:9:in `require'
from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails:9:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
I am not really familiar with ruby, but it says something about "mysql" which I have installed and added to the PATH variable.
Any help? Thx

The mysql gem that you installed expect an specific version of MySQL libmysql.dll be available in your system (when you gem install mysql it display the proper legend in the console).
mysql_api.so is failing to load and thus, generating the error you're seeing.
I've blogged about an alternate approach to install and compile the MySQL component independently of the version of MySQL you have installed.
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
Hope that helps.

This is probably version problem. I do had a same issue when i used old mysql version with new mysql gem.
Kindly find the correctly gem required for you mysql server.

Related

Runnin rspec from IntelliJ

I'm usally running my specs from inside IntelliJ. I've deleted my gems and reinstalled them using bundle install (due to another error) and now I'm getting an error when trying to run the specs.
I've noticed that running the specs from intelliJ it uses:
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
which isn't the case when running from the shell (I placed a print inside the kernel_require script check it).
Also I've see that the ruby version from intelliJ is:
"ruby 2.2.4: 230"
and from shell:
ruby -e 'print "ruby #{ RUBY_VERSION }p#{ RUBY_PATCHLEVEL }"'
ruby 2.2.6p396%
The error:
/home/user/.rvm/rubies/ruby-2.2.4/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/user/.rvm/gems/ruby-2.2.4/bin/rspec /home/user/workspace/auto-test/spec/pools/pool_cg_view_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter
Testing started at 10:21 ...
/home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': incompatible library version - /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri/nokogiri.so (LoadError)
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `rescue in <top (required)>'
from /home/user/.rvm/gems/ruby-2.2.4/gems/nokogiri-1.6.8/lib/nokogiri.rb:28:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara.rb:3:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara/dsl.rb:2:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/capybara-2.7.1/lib/capybara/rspec.rb:2:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /home/user/workspace/auto-test/spec/support/capybara.rb:3:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `block in <top (required)>'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `each'
from /home/user/workspace/auto-test/spec/spec_helper.rb:6:in `<top (required)>'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/rubies/ruby-2.2.4/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `block in requires='
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `each'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1295:in `requires='
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:109:in `block in process_options_into'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:108:in `each'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:108:in `process_options_into'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/configuration_options.rb:21:in `configure'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:101:in `setup'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:88:in `run'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:73:in `run'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:41:in `invoke'
from /home/user/.rvm/gems/ruby-2.2.4/gems/rspec-core-3.4.1/exe/rspec:4:in `<top (required)>'
from /home/user/.rvm/gems/ruby-2.2.4/bin/rspec:23:in `load'
from /home/user/.rvm/gems/ruby-2.2.4/bin/rspec:23:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
If I try to run the specs from shell it will work, no errors, so I guess the problem is related to the configuration of the run but not sure what.
The run configuration which worked until now:
I've tried to remove the nokogiri gem and reinstall it, but still the same.
Any ideas?
project structure:
You are pointing out that you are in ruby 2.2.6 when using the console. IntelliJ is complaining about missing the nokogiri gem.
I can imagine that probably your last bundle install did not use ruby 2.2.4 (as used by IntelliJ) but ruby 2.2.6 to install the gems.
I recommend the following steps to narrow this down:
verify and ensure that you are using ruby 2.2.4 on the shell (this is very important!)
run bundle install to ensure all gems of your project are installed for ruby 2.2.4
run your specs in the shell
If this succeeds then try running specs with IntelliJ.
This should work in case the steps described above went fine.
A personal note (not knowing if it's already the case):
In my projects I always have a .ruby-version file in the root of my project to ensure the correct ruby version for the current project. You may even go a step further and add a .ruby-gemset file.
More information can be found in the rvm docs

An error occurred in installing GitLab (install GitLab Shell phase) on Ubuntu 14.04 32bit

My server is ubuntu 14.04 (32bit).
GitLab easy installation is provided only for 64bit Ubuntu.
So I follow the guideline for installing GitLab from source. (documentation)
However, in Install GitLab Shell Phase, an error is occurred like below. (The first line...)
# sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true
rake aborted!
LoadError: cannot load such file -- /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/grpc_c
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/grpc.rb:37:in `require_relative'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/grpc.rb:37:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/errors.rb:30:in `require_relative'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/errors.rb:30:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc.rb:32:in `require_relative'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc.rb:32:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/gitaly-0.5.0/ruby/lib/gitaly/commit_services_pb.rb:4:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/gitaly-0.5.0/ruby/lib/gitaly.rb:6:in `<top (required)>'
/home/git/gitlab/config/application.rb:5:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
(See full trace by running task with --trace)
I think it may be ruby's error, but I don't know about ruby...
How I solve this problem?
Thanks :)
I solved it.
Through the log, there is no grpc_c file.
LoadError: cannot load such file -- /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/grpc-1.1.2/src/ruby/lib/grpc/grpc_c
So I installed ruby (same version) to root account.
And I installed gem, and grpc.
In the grpc path,
/usr/local/lib/ruby/gems/2.3.0/gems/grpc-1.1.2
there is "grpc_c.so" shared library file. Hence, I copied it and solved the problem.

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.

ruby postgreSQL on AMD64

---------------- EDIT ----------------
I've tried what #Duk said, and still nothing work.
After trying a little more, i figured out that the problem isn't on DataMapper.
In fact it's the postgreSQL adapter that fails on AMD64.
I have binary distribution of PostgreSQL (the last one found on their site) and I got all the gems by doing a
gem install...
Someone can help me ?
---------------- ORIGINAL ----------------
Following the "Get Started" from DataMapper website, i ran across this example :
# A Postgres connection:
DataMapper.setup(:default, 'postgres://localhost/the_database_name')
I have my postgre database installed, DataMapper and every dependency (dev-kit included)
Here's the code :
gem 'data_mapper'
require 'dm-core'
require 'dm-migrations/adapters/dm-postgres-adapter'
# If you want the logs displayed you have to do this before the call to setup
DataMapper::Logger.new($stdout, :debug)
# A Postgres connection:
DataMapper.setup(:default, 'postgres://localhost/test')
But when I run it, this error occurs :
D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 n?est pas une application Win32 valide. - D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres/1.9/do_postgres.so (LoadError)
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres.rb:30:in `rescue in <top (required)>'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres.rb:25:in `<top (required)>'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-postgres-adapter-1.2.0/lib/dm-postgres-adapter/adapter.rb:1:in `<top (required)>'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-postgres-adapter-1.2.0/lib/dm-postgres-adapter.rb:1:in `<top (required)>'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new'
from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core.rb:228:in `setup'
from D:/dev/workspace/ruby/training/bin/pg/main.rb:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
The error occurs on "load_adapter" function :
require "dm-#{name}-adapter"
Apparently the file isn't found.
I've tryed to include the adapter manually as proposed here but without success.
Any idea ? thanks
You have to install dm-postgres-adapter(gem install dm-postgres-adapter) then install data_mapper(gem install data_mapper).

Resources