Error with rake db:migrate with rails 4.1 on Mavericks - ruby-on-rails

I just upgraded my OS X from 10.7.5 to 10.9.3.
I've done the following:
- Upgraded ruby to 2.1.2 (and using it)
- bundle install succeeded
- installed postgres, server running.
$rails server -p 5000
works (the server runs)
However, when I do
$rake db:migrate
It gives me the following error:
rake aborted!
NameError: uninitialized constant AbstractController::Error
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:8:in `<module:AbstractController>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:7:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb:1:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/action_view_mods.rb:260:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/template.rb:3:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `block in init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:16:in `block (2 levels) in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:15:in `block in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/ppd/Academics/Research/git/teapot/config/environment.rb:5:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I can't seem to find anything on this on google/SO. I'd really appreciate help with it!

I haven't figured out the details of it, but apparently Haml is the culprit here.
Remove gem 'haml-rails' from your Gemfile if you have it, and replace it with:
gem 'haml', '~> 4.0.0'
Then run bundle update and boot up the Rails server again.

Related

Best In Place: wrong number of arguments (given 0, expected 3) (ArgumentError) with Action_view ' Initialize '

I recently upgraded Rails app 4.1 to 6.1 and I got this error shown below:
rake aborted!
ArgumentError: wrong number of arguments (given 0, expected 3)
/usr/local/bundle/gems/actionview-6.1.4.1/lib/action_view/base.rb:230:in `initialize'
/usr/local/bundle/gems/best_in_place-3.1.1/lib/best_in_place/railtie.rb:7:in `new'
/usr/local/bundle/gems/best_in_place-3.1.1/lib/best_in_place/railtie.rb:7:in `block in
<class:Railtie>'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:68:in
`block in execute_hook'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:61:in
`with_execution_control'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:66:in
`execute_hook'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:52:in
`block in run_load_hooks'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in
`each'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in
`run_load_hooks'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application/finisher.rb:140:in `block
in <module:Finisher>'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in
run_initializers'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in
`run_initializers'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
/usr/src/app/config/environment.rb:4:in `<top (required)>'
/usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in
`block in require'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in
`load_dependency'
/usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in
`require'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:367:in
`require_environment!'
/usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:533:in `block in
run_tasks_blocks'
/usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
Tasks: TOP => resque:work => resque:preload => resque:setup => environment
(See full trace by running task with --trace)
when I comment the gem best_in_place error goes out but this gem is used in the app that why it gives an error at localhost 3000 that why I comment out, again and again, same error occurs if any one have solution so give answers otherwise answer mail to santu.essence#gmail.com
From best_in_placce github page:
NB: For Rails >= 6.1 you can install the gem from this repository with:
gem "best_in_place", git: "https://github.com/mmotherwell/best_in_place"

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

ruby 2.5 on ubuntu:latest error assets:precompile

I support Rails 4.2.5 application on Ruby 2.5. Packages and rails are ok, but when I run rake assets:precompile I have error.
eric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `join'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:80:in `initialize'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:19:in `initialize'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `new'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/subscriber.rb:33:in `attach_to'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/log_subscriber.rb:75:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:2:in `<top (required)>'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.5.0/gems/activerecord-4.2.5/lib/active_record/railtie.rb:138:in `block in <class:Railtie>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `public_send'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/railtie.rb:194:in `method_missing'
/wealthoz/config/environment.rb:5:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
I don't deploy intro docker containers on ruby 2.5 image.
If you are on production environment, try RAILS_ENV=production rake assets:precompile
I think you should stick with Ruby 2.3, you could experience many runtime errors with 2.5 (like this one you reported)

rails server not starting after switching form version 4 to version 3

I am using rails version 3.2.6 and i recently downgraded from 4.0 because i wanted to work on a 3 version environment because the tutorial im following they are using version 3.
I am on a windows 7 machine and this is what i have done so far.
i first did gem install rails -v 3.2.6
then i did gem uninstall rails, and chose the version i wanted to install.
i then downgraded the gem that were dependent on rails version 4 and i was not getting any errors when running bundle install.
now when i try to do rails s to see what broke on my page the server never starts and i get a bunch of file names:
=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/dynamic_matchers.rb:50:in `method_missing'C:/Ruby200- x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: already initialized constant ActiveRecord::Base::OrmAdapter
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/orm_adapter-0.5.0/lib/orm_adapter/adapters/active_record.rb:81: warning: previous definition of OrmAdapter was here
: undefined method `migration_error=' for #<Class:0x000000053c7850> (NoMethodError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/railtie.rb:65:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.6/lib/active_record/base.rb:721:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise/orm/active_record.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:22:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/devise-3.2.4/lib/devise.rb:288:in `setup'
from C:/Users/Beans/Desktop/TestMaker/config/initializers/devise.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/engine.rb:587:in `block in <class:Engine>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Users/Beans/Desktop/TestMaker/config/environment.rb:5:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
from C:/Users/Beans/Desktop/TestMaker/config.ru:3:in `block in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `new'
from C:/Users/Beans/Desktop/TestMaker/config.ru:in `<main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
i know this might be a bunch of garbage to some, but if someone could help me that would be awesome. if you need more information, please let me know.
thank you in advance.
Since i am using rails on windows, RVM does not work, so i used the pik gem and with that i changed my environment to 3.2.6 and then it worked fine.

Cannot load Rails app fetched from GitHub; rake, rails server not working

I cloned an app folder from a GitHub repository, and after bundle install the gems, I tried to use the rake db:reset and rake db:migrate commands, neither worked, and here is my error message:
>[app_folder]rake db:reset
rake aborted!
Could not load database configuration. No such file - /Users/harry/Dropbox/apps/app_folder/config/database.yml
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application/configuration.rb:110:in `database_configuration'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activerecord-4.0.0/lib/active_record/railtie.rb:174:in `block (2 levels) in <class:Railtie>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activerecord-4.0.0/lib/active_record/railtie.rb:173:in `block in <class:Railtie>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/harry/Dropbox/apps/app_folder/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:reset => environment
(See full trace by running task with --trace)
[app_folder]
I get similar errors when I try to run rails server or rails console. Would really appreciate any help!! Thanks a lot!
Usually rails apps have config/database.yml.example, copy this file to config/database.yml and overwrite database connection settings if necessary.

Resources