Rails s command returns syntax error - ruby-on-rails

My Rails s command is not working, below is what I get. Line 7, where the syntax error is: require 'psych/parser'. Not sure how to correct this error.
/home/vagrant/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): found character that cannot start any token while scanning for the next token at line 7 column 1 (Psych::SyntaxError)
from /home/vagrant/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /home/vagrant/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /home/vagrant/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/psych.rb:129:in `load'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/figaro-0.7.0/lib/figaro.rb:21:in `raw'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/figaro-0.7.0/lib/figaro.rb:17:in `env'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/figaro-0.7.0/lib/figaro/railtie.rb:7:in `block in <class:Railtie>'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:36:in `call'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.1.5/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/application.rb:123:in `initialize'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/railtie.rb:171:in `new'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/railtie.rb:171:in `instance'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/application.rb:90:in `inherited'
from /home/vagrant/code/bloccit/config/application.rb:17:in `<module:Bloccit>'
from /home/vagrant/code/bloccit/config/application.rb:16:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/vagrant/code/bloccit/bin/rails:8:in `require'
from /home/vagrant/code/bloccit/bin/rails:8:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/vagrant/code/bloccit/bin/spring:16:in `require'
from /home/vagrant/code/bloccit/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

Related

Rails: Couldn't load the Unicode tables for UTF8Handler

I'm on a fresh Ubuntu 17.10 machine, Ruby 2.2.3 installed with RVM, and I'm trying to run a Rails 4.2 application.
After rails s command I get:
davide#davidell:~/app/app-backend$ rails s
Array values in the parameter to `Gem.paths=` are deprecated.
Please use a String or nil.
An Array ({"GEM_PATH"=>["/home/davide/.rvm/gems/ruby-2.2.3#app", "/home/davide/.rvm/gems/ruby-2.2.3#global"]}) was passed in from bin/rails:3:in `load'
=> Booting Puma
=> Rails 4.2.4 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:338:in `rescue in load': Couldn't load the Unicode tables for UTF8Handler (undefined method `getbyte' for false:FalseClass), ActiveSupport::Multibyte is unusable (IOError)
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:335:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:326:in `codepoints'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:147:in `block in decompose'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:136:in `each'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:136:in `inject'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:136:in `decompose'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/multibyte/unicode.rb:270:in `normalize'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/inflector/transliterate.rb:62:in `transliterate'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/inflector/transliterate.rb:83:in `parameterize'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/core_ext/string/inflections.rb:168:in `parameterize'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/scope.rb:35:in `initialize'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/resource/scopes.rb:34:in `new'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/resource/scopes.rb:34:in `scope'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/resource_dsl.rb:22:in `scope'
from /home/davide/app/app-backend/app/admin/venue.rb:28:in `block in <top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/dsl.rb:15:in `instance_exec'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/dsl.rb:15:in `run_registration_block'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/namespace.rb:223:in `parse_registration_block'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/namespace.rb:48:in `register'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:151:in `register'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin.rb:75:in `register'
from /home/davide/app/app-backend/app/admin/venue.rb:1:in `<top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:209:in `block in load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/error.rb:41:in `capture'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:209:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:201:in `block in load!'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:201:in `each'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:201:in `load!'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin/application.rb:223:in `routes'
from /home/davide/.rvm/gems/ruby-2.2.3#app/bundler/gems/activeadmin-893b46c6530c/lib/active_admin.rb:79:in `routes'
from /home/davide/app/app-backend/config/routes.rb:320:in `block (2 levels) in <top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:940:in `block in constraints'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:816:in `scope'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:940:in `constraints'
from /home/davide/app/app-backend/config/routes.rb:316:in `block in <top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:434:in `instance_exec'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:434:in `eval_block'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:412:in `draw'
from /home/davide/app/app-backend/config/routes.rb:1:in `<top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/file_update_checker.rb:75:in `call'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /usr/share/rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
from /home/davide/app/app-backend/config/environment.rb:5:in `<top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
from /home/davide/app/app-backend/config.ru:20:in `block in <main>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/davide/app/app-backend/config.ru:in `new'
from /home/davide/app/app-backend/config.ru:in `<main>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/server.rb:61:in `app'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/server.rb:78:in `start'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
from /home/davide/app/app-backend/bin/rails:8:in `require'
from /home/davide/app/app-backend/bin/rails:8:in `<top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/client/rails.rb:28:in `call'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/client/command.rb:7:in `call'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/client.rb:28:in `run'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/bin/spring:49:in `<top (required)>'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `load'
from /home/davide/.rvm/gems/ruby-2.2.3#app/gems/spring-1.4.0/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/davide/app/app-backend/bin/spring:13:in `require'
from /home/davide/app/app-backend/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
After several rails s tries, it works, but it's a totally random number of trials. If I stop the application, the same error occurs, and after several other tries, it works. So random.
Now I got:
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Creating and loading a custom gem via bundler gives errors on rails s

I used bundler to create a basic structure for a gem. I then put in a simple hello world and tried to put the gem in my app's gemfile. When I try to restart the server, it fails:
Am I missing a step?
bin/rails:3:in `<main>'
Bundler Error Backtrace:
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /Users/boristoet/Sites/regiowebsite/config/application.rb:7:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/boristoet/Sites/regiowebsite/bin/rails:8:in `require'
from /Users/boristoet/Sites/regiowebsite/bin/rails:8:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/boristoet/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/boristoet/Sites/regiowebsite/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'

i get this errors whenever i want to generate a new controller

Aikers-MBP:app Aiker$ rails g controller index home
Running via Spring preloader in process 62820
/Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/parser/option.rb:130:in `validate_default_type!': An option's default must match its type. (ArgumentError)
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/parser/option.rb:113:in `validate!'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/parser/argument.rb:24:in `initialize'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/parser/option.rb:9:in `initialize'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/base.rb:544:in `new'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/base.rb:544:in `build_option'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/thor-0.19.2/lib/thor/base.rb:278:in `class_option'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/generators/base.rb:202:in `class_option'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/generators/base.rb:178:in `block in hook_for'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `each'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/generators/base.rb:168:in `hook_for'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:9:in `<class:ScaffoldControllerGenerator>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:6:in `<module:Generators>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:5:in `<module:Rails>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/jbuilder-2.6.0/lib/generators/rails/scaffold_controller_generator.rb:4:in `<top (required)>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/jbuilder-2.6.0/lib/jbuilder/railtie.rb:32:in `block in <class:Railtie>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `block in run_generators_blocks'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/railtie.rb:247:in `each_registered_block'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/railtie.rb:230:in `run_generators_blocks'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `block in run_generators_blocks'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/engine/railties.rb:13:in `each'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/application.rb:453:in `run_generators_blocks'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/engine.rb:465:in `load_generators'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:144:in `generate_or_destroy'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Aiker/Desktop/app/bin/rails:9:in `<top (required)>'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Aiker/Desktop/app/vendor/bundle/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Aiker/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Aiker/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Aikers-MBP:app Aiker$

mysql2 gem crashes Rails on CentOS 6

I am using the mysql2 gem in my Rails code on a CentOS 6 system, and when Rails starts up, I see an error like this when Rails try to connect to the MySQL database :
/home/deploy/.rvm/gems/ruby-2.1.0#api/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `require':
/home/deploy/.rvm/gems/ruby-2.1.0#api/extensions/x86_64-linux/2.1.0/mysql2-
0.3.17/mysql2/mysql2.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE -
/home/deploy/.rvm/gems/ruby-2.1.0#api/extensions/x86_64-linux/2.1.0/mysql2-
0.3.17/mysql2/mysql2.so (LoadError)
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/mysql2-0.3.17/lib/mysql2.rb:8:in `<top (required)>'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `require'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `each'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:72:in `block in require'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `each'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler/runtime.rb:61:in `require'
from /home/deploy/.rvm/gems/ruby-2.1.0#global/gems/bundler-1.7.9/lib/bundler.rb:134:in `require'
from /u/apps/api/releases/20141218200648/config/application.rb:5:in `<top (required)>'
from /u/apps/api/releases/20141218200648/config/environment.rb:1:in `require'
from /u/apps/api/releases/20141218200648/config/environment.rb:1:in `<top (required)>'
from config.ru:4:in `require'
from config.ru:4:in `block in <main>'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/lib/unicorn.rb:48:in `eval'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/lib/unicorn.rb:48:in `block in builder'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/bin/unicorn_rails:139:in `call'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/bin/unicorn_rails:139:in `block in rails_builder'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:760:in `call'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:760:in `build_app!'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/lib/unicorn/http_server.rb:137:in `start'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/gems/unicorn-4.8.2/bin/unicorn_rails:209:in `<top (required)>'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/bin/unicorn_rails:23:in `load'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/bin/unicorn_rails:23:in `<main>'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/bin/ruby_executable_hooks:15:in `eval'
from /home/deploy/.rvm/gems/ruby-2.1.0#api/bin/ruby_executable_hooks:15:in `<main>'
Has anyone ever encountered something similar to this error before?

Unwanted lines in rails console error reporting

?> error
NameError: undefined local variable or method `error' for main:Object
from (irb):7
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/railties-4.2.0.beta4/lib/rails/commands/console.rb:110:in `start'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/railties-4.2.0.beta4/lib/rails/commands/console.rb:9:in `start'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/railties-4.2.0.beta4/lib/rails/commands/commands_tasks.rb:68:in `console'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/railties-4.2.0.beta4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/railties-4.2.0.beta4/lib/rails/commands.rb:17:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/ubuntu/workspace/sample_app/bin/rails:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `block in load'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/commands/rails.rb:6:in `call'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/command_wrapper.rb:38:in `call'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:180:in `block in serve'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:153:in `fork'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:153:in `serve'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /usr/local/rvm/gems/ruby-2.1.4#rails4/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
In rails console when I commit an error, the console displays tons of lines which I don't want to see. Can this be silenced?
I've found that you can add this line:
Rails.backtrace_cleaner.add_silencer { |line| line =~ /rvm/ }
in config/initializers/backtrace_silencers.rb but this doesn't resolve the problem.

Resources