Rails Console won't run (console error) - ruby-on-rails

I'd like to run rails console command but it throw error everytime I run it.
Here is the error I get :
Loading development environment (Rails 5.1.4)
D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `delete': invalid byte sequence in UTF-8 (ArgumentErr
or)
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `alloc_history_entry'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6123:in `add_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/readline.rb:368:in `<<'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block (2 levels) in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `each'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `open'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:65:in `extended'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `extend'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `init_save_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:45:in `save_history='
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/context.rb:91:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:6
2:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:1
7:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:9
7:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I've tried to reinstall/reinstall and clean every version of ruby with no success. I use Ruby 2.3.3 and rails 5.1.4.
Thanks

Since you are on Windows(I'm assuming since you have D:/):
Try installing rb-readline gem in your development group. That's the easiest way for solving readline issues.
There are other solutions as well if that doesn't work.

Related

Difficulties installing jekyll-polyglot: "Could not find gem 'helper x86_64-darwin-19'"

I'm new to Jekyll and I'm having a hard time installing the jekyll-polyglot plugin. My latest issues is the following, when trying to run "bundle exec" in the terminal. What is this 'helper x86_64-darwin-19'?
xxxx-xx:sebl xxxxx$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'helper x86_64-darwin-19' in any of the gem sources listed in your Gemfile.
If I run bundle exec jekyll serve, this is what I currently get:
Alessandros-Air:sebl alessandrolodola$ bundle exec jekyll serve
Configuration file: /Users/alessandrolodola/Desktop/SEBL/_config.yml
/Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/lib/jekyll/polyglot/version.rb:3: warning: already initialized constant Jekyll::Polyglot::VERSION
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-polyglot-1.3.3/lib/jekyll/polyglot/version.rb:3: warning: previous definition of VERSION was here
Dependency Error: Yikes! It looks like you don't have /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- rspec' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:73:in `rescue in block in require_with_graceful_fail': /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb (Jekyll::Errors::MissingDependencyException)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:89:in `block in require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:21:in `conscientious_require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in `setup'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in `initialize'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `new'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
/Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb:1:in `require': cannot load such file -- rspec (LoadError)
from /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:89:in `block in require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:21:in `conscientious_require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in `setup'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in `initialize'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `new'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
```
hi i also got this issue
same as yours
Solution_is_very_simple
bundle
bundle add webrick
jekyll serve --watch --port 3200
Run these commands then your problem will be solved

Deprecation error for rails stopping me from launching rails server

I am doing some open source stuff for the rails app https://github.com/publiclab/mapknitter but when I try to launch the rails server using rails s I get the following error message:
DEPRECATION WARNING: Support for Rails versions before 4.2 is deprecated and will be removed from skylight 2.0. (called from require at /Users/bena/.rvm/rubies/ruby-2.4.6/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
=> Booting WEBrick
=> Rails 3.2.22.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[SKYLIGHT] [1.7.2] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
Exiting
/Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `read': No such file or directory # rb_sysopen - /Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml (Errno::ENOENT)
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `database_configuration'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/railtie.rb:84:in `block (2 levels) in <class:Railtie>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/base.rb:720:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `require'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:19:in `<class:ColumnDefinition>'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:17:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `run'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `each'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application.rb:136:in `initialize!'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config/environment.rb:5:in `<top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:3:in `block in <main>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `new'
from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `<main>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:46:in `app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:70:in `start'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `tap'
from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Is the problem caused by the the version of rails I am using or the version of skylight or something else entirely?
I am using ruby 2.4.6p354 and rails 3.2.22.5
I have installed and tried to switch to rails 4.2.0 but that doesn't seem to be working, I think because in the gemfile there is a pessimistic version constraint of gem "rails" ,"~>3.2" but I could be completely wrong. I have been told not to change the gemfile.
Check first line in error backtrace. You dont have /config/database.yml in your project
No such file or directory # rb_sysopen -
/Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml
(Errno::ENOENT)
Make sure you install everything from Prerequisites and simply follow Installation guide

Can't do the command 'rails console' (error)

when I type 'rails console' in my website folder i get following error :
D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `delete': invalid byte sequence in UTF-8 (ArgumentError)
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `alloc_history_entry'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6123:in `add_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/readline.rb:368:in `<<'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block (2 levels) in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `each'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `open'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:65:in `extended'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `extend'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `init_save_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:45:in `save_history='
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/context.rb:91:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:62:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:17:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:97:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have Rails version 5.1.4, ruby 2.3.3 and installed it with this tutorial : http://installrails.com/steps/railsinstaller_windows
How can I fix this ?
Thanks

Having trouble starting rails server - no luck with googling it

Trying to start the rails server to complete "Learn Ruby on Rails" by Kehoe and keep getting psych errors and have no idea how to troubleshoot.
Here is the output:
/Dropbox/workspace/learn-rails$ rails s
/home/mark/.rvm/gems/ruby-2.1.2#global/gems/psych-2.0.6/lib/psych.rb:370:in `parse': (<unknown>): mapping values are not allowed in this context at line 6 column 15 (Psych::SyntaxError)
from /home/mark/.rvm/gems/ruby-2.1.2#global/gems/psych-2.0.6/lib/psych.rb:370:in `parse_stream'
from /home/mark/.rvm/gems/ruby-2.1.2#global/gems/psych-2.0.6/lib/psych.rb:318:in `parse'
from /home/mark/.rvm/gems/ruby-2.1.2#global/gems/psych-2.0.6/lib/psych.rb:245:in `load'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:60:in `parse'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:56:in `block in raw_configuration'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:56:in `yield'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:56:in `raw_configuration'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:64:in `global_configuration'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:32:in `configuration'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:42:in `each'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/application.rb:36:in `load'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro.rb:23:in `load'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/figaro-1.0.0/lib/figaro/rails/railtie.rb:5:in `block in <class:Railtie>'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:36:in `call'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/application.rb:123:in `initialize'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/railtie.rb:171:in `new'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/railtie.rb:171:in `instance'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/application.rb:90:in `inherited'
from /home/mark/Dropbox/workspace/learn-rails/config/application.rb:10:in `<module:LearnRails>'
from /home/mark/Dropbox/workspace/learn-rails/config/application.rb:9:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/mark/.rvm/gems/ruby-2.1.2#learn-rails/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'
Psych is a YAML parser and emitter. I guess that either you have a malformed database.yml or wrong encoding or something like that.
Given that Psych is a gem for handling YAML files and that your error indicates a syntax error, the odds are pretty solid you have a malformed YAML file somewhere in your config/ directory.

Ruby on rails - Error running rails s command

I installed the Rails installer in my Win7 machine from http://railsinstaller.org/. I already had the Ruby 1.9.2-p290. After installing the ROR through the installer, I rain rails s to start the server and I get the following error. Could anybody help me understanding the reason of this error>?
C:\Sites\ridemo>rails s
=> Booting WEBrick
=> Rails 3.1.0.rc6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0.rc6/lib/sp
rockets/railtie.rb:21:in `block (2 levels) in <class:Railtie>': undefined method
`static_root=' for #<Sprockets::Environment:0x361d178> (NoMethodError)
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/sprockets-2.0.
0/lib/sprockets/environment.rb:55:in `initialize'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1
.0.rc6/lib/sprockets/railtie.rb:20:in `new'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1
.0.rc6/lib/sprockets/railtie.rb:20:in `block in <class:Railtie>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/initializable.rb:25:in `instance_exec'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/initializable.rb:25:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/initializable.rb:50:in `block in run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/initializable.rb:49:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/initializable.rb:49:in `run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/application.rb:92:in `initialize!'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/ridemo/config/environment.rb:5:in `<top (required)>'
from C:/Sites/ridemo/config.ru:4:in `require'
from C:/Sites/ridemo/config.ru:4:in `block in <main>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/builder.rb:51:in `instance_eval'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/builder.rb:51:in `initialize'
from C:/Sites/ridemo/config.ru:1:in `new'
from C:/Sites/ridemo/config.ru:1:in `<main>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/builder.rb:40:in `eval'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/server.rb:200:in `app'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/commands/server.rb:46:in `app'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/server.rb:301:in `wrapped_app'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.3.2/lib
/rack/server.rb:252:in `start'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/commands/server.rb:70:in `start'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/commands.rb:54:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/commands.rb:49:in `tap'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.0
.rc6/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
RailsInstaller now supports Rails 3.1, but promise nothing about previous RC versions. Like #Fabio said, try to update to the latest Rails version (change it in your Gemfile). Also, if you already had a ruby version installed, be sure you are using the RailsInstaller one by checking your system environment path variable. The one and only path to Ruby should be :
C:\RailsInstaller\Ruby1.9.2\bin;
needed to run the following and It resolved the problem:-
gem install rails -v=3.1.0.rc8
From (https://github.com/sstephenson/sprockets/issues/172)

Resources