"bundle exec rake test" is pending - ruby

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

Related

My server wont start,ruby on rails mac

Blockquote
When i try to run bin/rails server,my server wont start up it will just display some connection errors or whatever.I tried bundle exec rails server but it didnt work either.
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/i/blog/config/routes.rb:7:in `<top (required)>': undefined method `resources' for main:Object (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
from /Users/i/blog/config/environment.rb:5:in `<top (required)>'
from /Users/i/blog/config.ru:3:in `require'
from /Users/i/blog/config.ru:3:in `block in <main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
from /Users/i/blog/config.ru:in `new'
from /Users/i/blog/config.ru:in `<main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:61:in `app'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/server.rb:78:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/i/blog/bin/rails:8:in `require'
from /Users/i/blog/bin/rails:8:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/rails.rb:27:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/client.rb:26:in `run'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/bin/spring:48:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load'
from /Library/Ruby/Gems/2.0.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/i/blog/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
heres my config/routes file
Rails.application.routes.draw do
resources :articles
root 'welcome#index'
end
resources :articles do
resources :comments
end
You have to read stacktraces from the top to understand wat is going on:
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
This is just a warning, you may want to fix that later. But you can ignore that at the moment, since it is just a warning.
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
This is the default output when Rails boots.
But now the interesting part:
Exiting
/Users/i/blog/config/routes.rb:7:in `<top (required)>': undefined method `resources' for main:Object (NoMethodError)
This line tells you that you have a undefined method 'resources' in the 7th line (or before that line) of your config/routes.rb.
The problem is caused by the second resources :articles block that is not within the outer Rails.application.routes.draw block. Furthermore you have two resources :articles, but you only need one. Copy the following version to config/routes.rb to fix your issue:
Rails.application.routes.draw do
root 'welcome#index'
resources :articles do
resources :comments
end
end

Infinitely loading gem (requires subgems)

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?

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.

heroku run error, bad URI

I can run the application on my local mac pc.
But when I run heroku I got this error. But I have no idea...
zzz-ui-MacBook-Pro:backend zzz$ heroku run bundle exec rails console
Running `bundle exec rails console` attached to terminal... up, run.7525
Connecting to database specified by DATABASE_URL
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:176:in `split': bad URI(is not URI?): (URI::InvalidURIError)
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:211:in `parse'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/uri/common.rb:747:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven/configuration.rb:96:in `server='
from /app/config/initializers/raven.rb:5:in `block in <top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/sentry-raven-0.6.0/lib/raven.rb:62:in `configure'
from /app/config/initializers/raven.rb:4:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `block in load'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:245:in `load'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `instance_exec'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:30:in `run'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:55:in `block in run_initializers'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/initializable.rb:54:in `run_initializers'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:136:in `initialize!'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /app/config/environment.rb:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.15/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/application.rb:103:in `require_environment!'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.15/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Please help me.
Thanks ~!!
The error is coming from:
config/initializers/raven.rb
which looks like it has something to do with the sentry-raven gem, based on the stack trace lines right above that. You should check the documentation for that gem and make sure that any code in that initializer plus any environment variables are set appropriately for your production environment on heroku.
Check your config variables, particularly DATABASE_URL as shown here. Also verify you used the Heroku add-ons for Postgres, Mongo, Neo4J, or whatever you're using rather than connect anything yourself.

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.

Resources