Rails 5 active admin installation issue - ruby-on-rails

I am new to rails and trying to add active admin on latest version of ruby 2.3.0 and rails5 . i have added below line in gem file :
gem 'inherited_resources', github: 'activeadmin/inherited_resources'
gem 'activeadmin', github: 'activeadmin'
did bundle install and then i run the server and i am getting the below error:
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/bundler/gems/inherited_resources-6fa6e5b9d29c/lib/inherited_resources.rb:30:in `block in <top (required)>': break from proc-closure (LocalJumpError)
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:43:in `instance_eval'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:43:in `execute_hook'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:49:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_controller/api.rb:145:in `<class:API>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_controller/api.rb:88:in `<module:ActionController>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.1/lib/action_controller/api.rb:5:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/jbuilder-2.6.1/lib/jbuilder/railtie.rb:20:in `block (2 levels) in <class:Railtie>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:43:in `instance_eval'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:43:in `execute_hook'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:33:in `block in on_load'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:32:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.1/lib/active_support/lazy_load_hooks.rb:32:in `on_load'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/jbuilder-2.6.1/lib/jbuilder/railtie.rb:19:in `block in <class:Railtie>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/application.rb:352:in `initialize!'
from C:/Sites/second_project/config/environment.rb:5:in `<top (required)>'
from C:/Sites/second_project/config.ru:3:in `require_relative'
from C:/Sites/second_project/config.ru:3:in `block in <main>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `instance_eval'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:55:in `initialize'
from C:/Sites/second_project/config.ru:in `new'
from C:/Sites/second_project/config.ru:in `<main>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:49:in `eval'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:49:in `new_from_string'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/builder.rb:40:in `parse_file'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:318:in `build_app_and_options_from_config'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:218:in `app'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/server.rb:59:in `app'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rack-2.0.1/lib/rack/server.rb:353:in `wrapped_app'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/server.rb:124:in `log_to_stdout'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/server.rb:77:in `start'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:90:in `block in server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I google these error but it seems code error however i have not written any code in newly created project just trying to install active admin for practise.
Please help me to sort this out.

This is due to a recent bug. Just use the latest version from RubyGems, not GitHub. If you omit inherited_resources from your Gemfile this should be done for you by default.

Here is what I would use in my Gemfile:
gem 'activeadmin', github: 'activeadmin'
gem 'inherited_resources'
Looking at 'inherited_resources' github repository, it looks likes the current version in the repo is broken. As a best practice try to use versions of gem that you can control (the call above is not even really clean for a production app)
You may also fall on some SSL error after so to fix this, just add the following to your Gemfile
gem 'openssl', '>=2.0.3'

Related

rbenv gives me to long error report in shell when something happens with my rails app

rbenv gives me to long error report in shell when something happens with my rails app in development. I don't need this. How can I disable it?
Example:
Exiting
/home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters
/connection_specification.rb:177:in `rescue in spec': Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_handling.rb:50:in `establish_connection'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `each'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
from /home/kirill/Projects/kirill-zhuravlov-blog/config/environment.rb:5:in `<top (required)>'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
from /home/kirill/Projects/kirill-zhuravlov-blog/config.ru:3:in `block in <main>'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /home/kirill/Projects/kirill-zhuravlov-blog/config.ru:in `new'
from /home/kirill/Projects/kirill-zhuravlov-blog/config.ru:in `<main>'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/kirill/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
But the actual problem is just my commented " #gem 'pg' " in gemfile. Im using latest LTS Ubuntu, ruby 2.3 and rails 4.2
I found solution to this issue. I open bashrc(shell startup configuration file) in terminal
nano ~/.bashrc
and cut
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
then I save changes and exit (ctrl+O enter ctrl+X).
And the long output is gone.

Trouble when attempting to launch Rails Server

Sorry if this is a bad question, I'm trying to initially set up Rails, so I don't really know what I'm doing. In the tutorial I'm following it comes to a point at which is says to run "rails server," however this is returning some unexpected results.(See below)
Macbookpro:First Cameron$ sudo rails server
Password:
=> Booting WEBrick
=> Rails 4.1.0 application starting in development on http:// 0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `action_mailer' for #<Rails::Application::Configuration:0x007fea90b47760> (NoMethodError)
from /Users/admin/Rails/First/config/environments/development.rb:17:in `block in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie.rb:210:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie.rb:210:in `configure'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie.rb:182:in `configure'
from /Users/admin/Rails/First/config/environments/development.rb:1:in `<top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:593:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/engine.rb:593:in `block in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/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:210:in `block (2 levels) in each_strongly_connected_component_from'
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:209:in `block in each_strongly_connected_component_from'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tsort.rb:203: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.1.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
from /Users/admin/Rails/First/config/environment.rb:5:in `<top (required)>'
from /Users/admin/Rails/First/config.ru:3:in `require'
from /Users/admin/Rails/First/config.ru:3:in `block in <main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/admin/Rails/First/config.ru:in `new'
from /Users/admin/Rails/First/config.ru:in `<main>'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:50:in `app'
from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/server.rb:67:in `start'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Sorry if this is not needed, but I'm really unsure what to do with it.
I don't think you're alone in this error.
Make sure you coordinate your gem versions, and even better if specify the versions of your Rails & Ruby gems to avoid potential conflicts in versioning.
Posting your Gemfile would be helpful, but without seeing it, I'd say to specify your Ruby version at the top of your gemfile like:
source 'https://rubygems.org'
ruby '2.0.0'
Then specify your version of Rails. While I have had no problems with just providing:
gem 'rails'
You could be extra safe and specify a version like:
gem 'rails', '4.0.2'
Then run: bundle install for your app.
Take a look at the following tutorial. I realise that it is for windows however it solved all the initial problems I was having with my first install.
http://www.soheiokamoto.com/setting-up-ruby-on-rails-on-windows
The main point that helped me install perfectly was;
Run gem update on a fresh install to make sure everything is up to date

unable to run rails server after updating to rails 4

I just now my rails app to rails 4 from rails 3. I am not able to get it to work. I have done all the necessary configuration removal and addition whereever necessary. But now I am facing this. IS the question too blunt? IF so comment on what information is needed to make it more understandable. I am a totally new to rails, please help.
/home/aravind/Documents/dev/ptl/config/initializers/simple_form.rb:8:in `block in <top (required)>': undefined method `wrappers' for SimpleForm:Module (NoMethodError)
from /usr/local/lib/ruby/gems/2.0.0/gems/simple_form-1.4.1/lib/simple_form.rb:143:in `setup'
from /home/aravind/Documents/dev/ptl/config/initializers/simple_form.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:608:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:608:in `block in <class:Engine>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /usr/local/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/aravind/Documents/dev/ptl/config/environment.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/aravind/Documents/dev/ptl/config.ru:3:in `block in <main>'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/aravind/Documents/dev/ptl/config.ru:in `new'
from /home/aravind/Documents/dev/ptl/config.ru:in `<main>'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from /usr/local/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
it looks like you are running simple_form 1.4.1 try upgrading it to the latest version. which should work with rails 4. if you are specifying a version in your Gemfile remove the version tag, and run bundle update
Give this a go gem 'simple_form', :git => 'git://github.com/plataformatec/simple_form.git'. I think you need a more recent version of simple_form.

Error installing devise for rails4

I'm trying to migrate an existing app to ruby 2.0 + rails 4.0 and so far everything is working except that when I try to install devise:
rails generate devise:install
I get the following error:
Exiting
/home/lemur/rails_projects/delicateca/config/initializers/devise.rb:76:in `block in <top (required)>': undefined method `skip_session_storage=' for Devise:Module (NoMethodError)
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/devise-1.5.4/lib/devise.rb:252:in `setup'
from /home/lemur/rails_projects/delicateca/config/initializers/devise.rb:3:in `<top (required)>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `block in load'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:222:in `load'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/engine.rb:608:in `block (2 levels) in <class:Engine>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/engine.rb:607:in `each'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/engine.rb:607:in `block in <class:Engine>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `run'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:44:in `each'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:44:in `tsort_each_child'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:186:in `each'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:186:in `each_strongly_connected_component'
from /home/lemur/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/2.0.0/tsort.rb:154:in `tsort_each'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/application.rb:213:in `initialize!'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/lemur/rails_projects/delicateca/config/environment.rb:5:in `<top (required)>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `block in require'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
from /home/lemur/rails_projects/delicateca/config.ru:3:in `block in <main>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /home/lemur/rails_projects/delicateca/config.ru:in `new'
from /home/lemur/rails_projects/delicateca/config.ru:in `<main>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:46:in `app'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/commands/server.rb:71:in `start'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `tap'
from /home/lemur/.rvm/gems/ruby-2.0.0-preview1/gems/railties-4.0.0.beta1/lib/rails/commands.rb:73:in `<top (required)>'
from script/rails:6:in `require'
I get the same error when I try to run the app just doing bundle install and then rails s.
Any idea?
Thanks!
[UPDATE]
The rails4 branch has now been merged into master. So this should be all you need now:
gem 'devise', github: 'plataformatec/devise'
I've left my old answer below.
================================================
The easiest fix today is to use the following in your gemfile:
gem 'devise', github: 'plataformatec/devise', branch: 'rails4'
More details can be found on the comment of this pull request for Devise.
At the time of Lemurido's response, his was the best solution to your error.
This seems to be a dependency issue, as explained by Aaron Paterson:
http://tenderlovemaking.com/2012/12/18/rails-4-and-your-gemfile.html
The solution (in the comments) is updating your gemfile with:
gem 'devise', github: 'idl3/devise', branch: 'rails4'

Rails server won't start after I did a bundle update

After I did a bundle update, I get this error when i try to run rails s:
(The only thing I added was a bcrypt-ruby gem, but I dont think that has anything to with this...)
/Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `less' for #<Rails::Application::Configuration:0x007fc33b079468> (NoMethodError)
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/twitter-bootstrap-rails-2.1.6/lib/twitter/bootstrap/rails/engine.rb:15:in `block in <class:Engine>'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/fettass/Documents/RailsApps/epyhrepus/config/environment.rb:5:in `<top (required)>'
from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:4:in `require'
from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:4:in `block in <main>'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:1:in `new'
from /Users/fettass/Documents/RailsApps/epyhrepus/config.ru:1:in `<main>'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from /Users/fettass/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
How do I resolve this issue?
It looks like you need to add the less-rails gem to your Gemfile:
gem "less-rails", "~> 2.2.6"

Resources