Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 0.9.0 with Rails 3, "undefined method `task' for MyApp::Application" #33

Closed
jneen opened this issue May 20, 2011 · 12 comments
Closed

Comments

@jneen
Copy link

jneen commented May 20, 2011

Reverting to 0.8.7 resolves the issue. A stacktrace will be forthcoming.

@mjansen401
Copy link

I had a similar issue when running rake db:migrate on a new rails app. I reverted 0.8.7 to resolve. Stack trace:

MikeBookPro:dedicated mjansen$ rake db:migrate --trace
rake aborted!
undefined method task' for #<Dedicated::Application:0x000001010202b8> /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.6/lib/rails/application.rb:215:ininitialize_tasks'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.6/lib/rails/application.rb:139:in load_tasks' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.6/lib/rails/application.rb:77:inmethod_missing'
/Users/mjansen/projects/dedicated/Rakefile:7:in <top (required)>' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/rake_module.rb:25:inload'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in load_rakefile' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:495:inraw_load_rakefile'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:78:in block in load_rakefile' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:129:instandard_exception_handling'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:77:in load_rakefile' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:61:inblock in run'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:129:in standard_exception_handling' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/lib/rake/application.rb:59:inrun'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.0/bin/rake:31:in <top (required)>' /Users/mjansen/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:inload'
/Users/mjansen/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `

'

@r00k
Copy link

r00k commented May 20, 2011

Seeing the same issue with 0.9.0, which was upgraded as part of a move to Rails 3.0.7.

Trace:
bjo@breakfast ~/projects/camberwell (master) $ rake --trace
rake aborted!
undefined method task' for #<Camberwell::Application:0x1054fd728> /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:215:ininitialize_tasks'
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:139:in load_tasks' /Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:insend'
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in method_missing' /Users/bjo/code/camberwell/Rakefile:7 /Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:inload'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:495:inraw_load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:78:in load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:129:instandard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:77:in load_rakefile' /Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:61:inrun'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:129:in standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:59:inrun'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

@dimitarvp
Copy link

Environment: Windows XP SP2 x64

ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\code\blog>rake -T
(in C:/code/blog)
rake aborted!
uninitialized constant Rake::DSL
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2482:in const_missing' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:8:inclass:TaskLib'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:6:in <module:Rake>' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:3:in<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/rdoctask.rb:20:in require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/rdoctask.rb:20:in<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:15:in load' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:15:inblock in <top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:6:in each' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:6:in<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:214:in require' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:214:ininitialize_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:139:in load_tasks' C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:77:inmethod_missing'
C:/code/blog/Rakefile:7:in <top (required)>' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:inload'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in raw_load_rakefile' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:inblock in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling' C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:inload_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in run' C:/Ruby192/bin/rake:31:in

'

This is absolutely brand new rails app, made from the rails guides. It barely contains anything.

Error occurs when Gemfile.lock contains "rake (0.9.0)". Changing it to "rake (0.8.7)" stops this error.

@jimweirich
Copy link
Owner

Two issues here: (1) dimitko's issue is that the built in rake command is being mixed with the new gem's library files. Arranging your $PATH environment list so that the gem version of rake has precendence over the built-in version should fix that. If you are using bundler, you might also want to try 'bundle exec rake'.

The second issue (mjansen401 and r00k above) is that the new version of rake does not put its DSL commands (task, file, desc, import, etc) in the root of the Object namespace anymore (placing them in Object meant every object has a task command, not very nice . The DSL commands are available by mixing in the Rake::DSL module into any module needing the commands.

Until rails is updated to work with Rake 0.9.x, put the following in your project Rakefile before the call to Application.load_tasks:

class Rails::Application
  include Rake::DSL if defined?(Rake::DSL)
end

Let me know if these work for you.

@dimitarvp
Copy link

Thanks for your timely reply, Jim.

For me the "bundle exec rake" solution AND putting the code snippet in the Rakefile worked (none of them alone, only both together). I would avoid adjusting PATH or symlinking rake for the simple reason that when I deploy the application to a live server, I would have to repeat that for every new version of the gem from now on.

I am still far from a Rails guru and this advice really put me back on track. Thanks for the hint! <3

@jimweirich
Copy link
Owner

Sweet. Glad that worked for you.

Actually, you shouldn't have to change $PATH for each new gem. The 'gem' command installs executable stubs for all of its gems in a particular directory. You can find that directory with:

gem env | grep 'EXECUTABLE DIR'
  - EXECUTABLE DIRECTORY: /Users/jim/.rvm/gems/ruby-1.9.2-p136@090/bin

Mine is a directory setup by rvm, so it depends version of Ruby and the gemset, but if you are not using rvm it will be in a fixed directory. In any case, the directory doesn't depend on the version of the gem. Just make sure the gem executable path occurs before the built-in ruby directory in $PATH.

@schmickie
Copy link

I have the same issue where task is undefined after upgrading to 0.9.0. I cannot find any rake 0.8.7 binaries on my machine:

blah@schmick:~/abitlucky/web/luckyonrails$ locate rake | grep bin | grep -v rake2thor
/usr/local/ruby/bin/rake
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.0/bin
/usr/local/ruby/lib/ruby/gems/1.9.1/gems/rake-0.9.0/bin/rake

/usr/local/ruby/bin/rake --version
rake, version 0.9.0

bundle exec rake doesn't help and just prints out the same error:

bundle exec rake
Loading data_fabric 1.3.1 with ActiveRecord 3.0.1
WARN: rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
undefined method `task' for #

(See full trace by running task with --trace)

@schmickie
Copy link

So adding the following to my Rakefile worked, even though I was not getting the 'uninitialized constant Rake::DSL' error.

  class Rails::Application
       include Rake::DSL if defined?(Rake::DSL)
  end

@kinjal20
Copy link

kinjal20 commented Jan 3, 2017

below error is generated when rake db:create on terminal so what may be solution:

** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
FATAL: role "cc2-43" does not exist
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "database"=>"myapp_development"}
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: role "cc2-43" does not exist
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in rescue in connect' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in connect'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in initialize' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in new'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in postgresql_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in new_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in checkout_new_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in try_to_checkout_new_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in acquire_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in checkout'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in retrieve_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_handling.rb:128:in retrieve_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_handling.rb:91:in connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/postgresql_database_tasks.rb:6:in connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/postgresql_database_tasks.rb:15:in create'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:109:in create' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:129:in block in create_current'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:292:in block in each_current_configuration' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:291:in each'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:291:in each_current_configuration' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:128:in create_current'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/railties/databases.rake:27:in block (2 levels) in <top (required)>' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in block in execute'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in each' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in execute'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:194:in block in invoke_with_call_chain' /home/cc2-43/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:187:in invoke_with_call_chain' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:180:in invoke'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:152:in invoke_task' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in block (2 levels) in top_level'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in each' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in block in top_level'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:117:in run_with_threads' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:102:in top_level'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:80:in block in run' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:178:in standard_exception_handling'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:77:in run' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake:27:in <top (required)>'
/home/cc2-43/.rvm/gems/ruby-2.3.3/bin/rake:22:in load' /home/cc2-43/.rvm/gems/ruby-2.3.3/bin/rake:22:in

'
/home/cc2-43/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in eval' /home/cc2-43/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in '
PG::ConnectionBad: FATAL: role "cc2-43" does not exist
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in initialize' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in new'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in connect' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in initialize'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in new' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in postgresql_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in new_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in checkout_new_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in try_to_checkout_new_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in acquire_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in checkout' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in retrieve_connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_handling.rb:128:in retrieve_connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_handling.rb:91:in connection' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/postgresql_database_tasks.rb:6:in connection'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/postgresql_database_tasks.rb:15:in create' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:109:in create'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:129:in block in create_current' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:292:in block in each_current_configuration'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:291:in each' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:291:in each_current_configuration'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:128:in create_current' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/railties/databases.rake:27:in block (2 levels) in <top (required)>'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in block in execute' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in each'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:250:in execute' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:194:in block in invoke_with_call_chain'
/home/cc2-43/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:187:in invoke_with_call_chain'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/task.rb:180:in invoke' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:152:in invoke_task'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in block (2 levels) in top_level' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in each'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:108:in block in top_level' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:117:in run_with_threads'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:102:in top_level' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:80:in block in run'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:178:in standard_exception_handling' /home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/lib/rake/application.rb:77:in run'
/home/cc2-43/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake:27:in <top (required)>' /home/cc2-43/.rvm/gems/ruby-2.3.3/bin/rake:22:in load'
/home/cc2-43/.rvm/gems/ruby-2.3.3/bin/rake:22:in <main>' /home/cc2-43/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in eval'
/home/cc2-43/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `'
Tasks: TOP => db:create

@amaniak
Copy link

amaniak commented Jan 3, 2017

@kinjal20: this is not a issue with rake, you've got to setup your database correctly.

@kinjal20
Copy link

kinjal20 commented Jan 3, 2017

I have installed ruby on rails so many times but every time got new error so may you provide proper steps in which way I can use my code and error is like :

rails s // server start
Error is as below:
Your bundle is locked to ZenTest (4.9.4), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of ZenTest (4.9.4) has removed it. You'll need to update your bundle to a different version of ZenTest (4.9.4) that hasn't been removed in order to install.
Try running bundle install.

what can be solution?

@drbrain
Copy link
Collaborator

drbrain commented Jan 3, 2017

You will need to find support for rails elsewhere.

Repository owner locked and limited conversation to collaborators Jan 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants