I have issues starting the server - ruby-on-rails

I am new to the ruby environment. I configured ruby and when I start the server I am hit with the series of errors. Can someone please give me a hand please.
2.3.1 :001 > rails s
NameError: undefined local variable or method `s' for main:Object
from (irb):1
from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/console.rb:110:in `start'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/console.rb:9:in `start'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /Users/User/workspace/dineconnect-backend/bin/rails:9:in `<top (required)>'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/commands/rails.rb:6:in `call'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/command_wrapper.rb:38:in `call'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:191:in `block in serve'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:161:in `fork'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:161:in `serve'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
from /Users/User/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/User/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/User/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'

You are trying to start rails server in interactive Ruby Shell (IRB or irb), or may be rails console.
use the command
rails s
in your terminal
You should have to look into this http://guides.rubyonrails.org/getting_started.html for the rails basics.

You are using rails console. Get out of the console by typing quit and then type rails s

Related

Is there something wrong with this Rails Console error message?

Very new to Rails, so bear with me -
Currently paranoid that my ruby and gem versions aren't up to date because I'd occasionally get error messages when running rails test. Previously had rvm and rbenv both installed, but wow I've removed both and reinstalled rvm only.
When I go into a irb and call an action that doesn't work, such as: "foo".select, I get a simple error message:
NoMethodError: private method 'select' called for "foo":String
from (irb):4
from /Users/Joseph/.rvm/rubies/ruby-2.3.1/bin/irb:11:in '<main>'
However, when I type the same command "foo".select in rails console instead, I get:
NoMethodError: private method `select' called for "foo":String
from (irb):1
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Joseph/workspace/sample_app/bin/rails:9:in `<top (required)>'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/commands/rails.rb:6:in `call'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/command_wrapper.rb:38:in `call'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:191:in `block in serve'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:161:in `fork'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:161:in `serve'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/Joseph/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Joseph/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Is this normal? Or is there something wrong with my gems here?
There's nothing wrong with your gems. The thing is that when you run irb, it's just that. You only run the ruby interactive.
When you run rails console in order to show you the console it needs to go and set it for you with ActiveRecord, rails core, etc. So this (below) is all it does before it's set.
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/Joseph/workspace/sample_app/bin/rails:9:in `<top (required)>'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/commands/rails.rb:6:in `call'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/command_wrapper.rb:38:in `call'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:191:in `block in serve'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:161:in `fork'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:161:in `serve'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /Users/Joseph/.rvm/gems/ruby-2.3.1#sample_app/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/Joseph/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/Joseph/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Notice that irb is executed really fast, while rails console takes its time, depending on your initializers, configurations, etc.

Rails Console Error Output

I just recently updated Ruby(2.3.1) and Rails(5.0.0.1). Now, when I get an error ( any type of error) on the rails console, it's followed by about 15-20 lines starting with 'from/Users....../.rvm/..etc'. Any idea why I am getting so many lines of this error output and if it's normal? How could I fix it? Everything else regarding Ruby/Rails works perfectly fine for me otherwise, so maybe it's just normal output. However, it is a bit of an annoyance.
The commonality in each path seems to be '.rvm'.
For example:
2.3.1 :031 > test
ArgumentError: wrong number of arguments (given 0, expected 2..3)
from (irb):31:in `test'
from (irb):31
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/railties-5.0.0.1/lib/rails/commands/console.rb:65:in `start'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/railties-5.0.0.1/lib/rails/commands/console_helper.rb:9:in `start'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:78:in `console'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/AlfonsoGiron/workspace/sample_app/bin/rails:9:in `<top (required)>'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `block in load'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1#global/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:287:in `load'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/commands/rails.rb:6:in `call'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/command_wrapper.rb:38:in `call'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:191:in `block in serve'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:161:in `fork'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:161:in `serve'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /Users/AlfonsoGiron/.rvm/gems/ruby-2.3.1/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/AlfonsoGiron/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/AlfonsoGiron/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
2.3.1 :032 >
Thanks for any help.
Rails console uses IRB under the covers, so you're going to have to edit your IRB configuration file, usually located at ~/irbrc, and change the BACK_TRACE_LIMIT value:
IRB.conf[:BACK_TRACE_LIMIT]=0
During a Rails console session, you can also run:
conf.back_trace_limit = 0
There are many more configuration options for IRB (and by extension, Rails console). Check them out at ruby-doc.org.

Shows error when run 'rails g rails_admin:install' command

I was trying to install rails_admin gem in my rails app.I followed this document. But when I run the command rails g rails_admin:install it shows the following error.
Running via Spring preloader in process 51535
? Where do you want to mount rails_admin? Press <enter> for [admin] > /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor/readline.rb:20:in `readline': Input/output error - read (Errno::EIO)
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor/readline.rb:20:in `readline'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/line_editor.rb:7:in `readline'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell/basic.rb:395:in `ask_simply'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell/basic.rb:68:in `ask'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/shell.rb:59:in `ask'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/rails_admin-0.8.1/lib/generators/rails_admin/utils.rb:13:in `ask_for'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/rails_admin-0.8.1/lib/generators/rails_admin/install_generator.rb:13:in `install'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/generators.rb:157:in `invoke'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/generate.rb:13:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:130:in `generate_or_destroy'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/home/Neethu/Projects/Rails/Personal/SampleRailsAdmin/bin/rails:9:in `<top (required)>'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/home/.rbenv/versions/2.2.3/gemsets/voiceover/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/home/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/home/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I am using gemset with Ruby version 2.2.3 and Rails version 4.2.5.
Please suggest some solution.Thanks in advance
After restarting the system it got worked !!!

Shorten Error Message in Terminal

Rails error messages in terminal are too long and contain often useless information. Is there a gem/solution to shorten rails error messages?
Example:
2.2.2 :012 > puts 1.red
What I currently get:
NoMethodError: undefined method `red' for 1:Fixnum
from (irb):12
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/railties- 4.2.1/lib/rails/commands/console.rb:110:in `start'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/railties-4.2.1/lib/rails/commands/console.rb:9:in `start'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
from /Users/Ben/coding/krokoapp/bin/rails:8:in `<top (required)>'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/Ben/.rvm/gems/ruby-2.2.2#global/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/commands/rails.rb:6:in `call'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/command_wrapper.rb:38:in `call'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:183:in `block in serve'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:156:in `fork'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:156:in `serve'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/Ben/.rvm/gems/ruby-2.2.2#rails-devise-roles/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/Ben/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/Ben/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'2.2.2 :013 >
What I want: (optionally in red)
NoMethodError: undefined method `red' for 1:Fixnum
===>Long error message saved in e. Get full messages with 'puts e'
Would this be possible?
You could try better_errors gem.
It provides also a better explanation of the errors via browser.
This is the link to the github repo
EDIT
If you are looking also to a customizable console (also the exception trace) try to see pry

Rails 4.1.1 with console in production

I keep getting this error since updating to rails 4.1.1 and starting my console in production as: RAILS_ENV=production rails c
load error: /home/tristan/.rvm/rubies/ruby-2.1.1/.irbrc
NoMethodError: undefined method `split' for nil:NilClass
/home/tristan/.rvm/scripts/irbrc.rb:41:in `<top (required)>'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
/home/tristan/.rvm/rubies/ruby-2.1.1/.irbrc:11:in `<top (required)>'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
/home/tristan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/init.rb:236:in `run_config'
/home/tristan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/init.rb:19:in `setup'
/home/tristan/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb.rb:380:in `start'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/console.rb:90:in `start'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/console.rb:9:in `start'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:69:in `console'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
/home/tristan/joggle/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
I just had this same issue. I ran 'spring stop' then 'rails c' and it corrected the error. Something got mucked up with the environment because line 41 of that irbrc.rb file refers to the ENV variable GEM_HOME, which I confirmed was actually set.
Does that fix your issue?

Resources