Rails rake giving conflict messages (rails 3.1) - ruby-on-rails

Abbreviated paths:
me#michael-laptop:~/Dropbox_not_syncd/webs/3/tdd/rubyists$ rake db:create
.../rake/version.rb:4: warning: already initialized constant MAJOR
.../rake/version.rb:5: warning: already initialized constant MINOR
.../rake/version.rb:6: warning: already initialized constant BUILD
.../rake/version.rb:3: warning: already initialized constant NUMBERS
.../rake/version.rb:9: warning: already initialized constant VERSION
.../rake.rb:26: warning: already initialized constant RAKEVERSION
.../rake/early_time.rb:17: warning: already initialized constant EARLY
.../rake/alt_system.rb:32: warning: already initialized constant WINDOWS
.../rake/application.rb:28: warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
.../rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
.../rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
.../rake/file_utils.rb:10: warning: already initialized constant RUBY
.../rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
.../rake/dsl_definition.rb:143: warning: already initialized constant Commands
.../rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
.../rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
.../rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
.../rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
.../rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
.../rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
.../rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
.../rake.rb:64: warning: already initialized constant FileList
.../rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep
(See full trace by running task with --trace)
Full Paths:
#michael-laptop:~/Dropbox_not_syncd/webs/3/tdd/rubyists$ rake db:create
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/application.rb:28: warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList
/home/me/.rvm/gems/ruby-1.9.2-p180#global/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep
(See full trace by running task with --trace)

bundle exec rake db:migrate should solve this error. I ran into the same thing a while ago and this solved it for me.

As a side note, RVM no longer installs rake into the global gemset for use with each gemset for a specific ruby. This is germane because we do this so that you can install rake PER-PROJECT via the Gemfile and/or the gemset directly.
We highly encourage per-project .rvmrc files so as to isolate each project's gems to its specific gemset assignment. This keeps 'default' and/or 'global' from A) being polluted, or B) polluting other gemsets.
The only gem that should be in the 'global' gemset for each installed Ruby should be bundler.
rvm x.x.x#global exec rvm gemset empty && rvm x.x.x#global exec gem install bundler && rvm --create use x.x.x#mygemset && gem list -l
will demonstrate this quite effectively. Also, by doing it this way you effectively eliminate the need to
bundle exec ...
at all.

Related

Console error in any rake command in my rails app

I'm having some problem when running any rake command in my rails application:
humberto#asterix:/var/www/avante-q-a$ rake db
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:11: warning: already initialized constant DEFAULT_HOOKS
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:23: warning: already initialized constant DEFAULT_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:48: warning: already initialized constant SIMPLE_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:57: warning: already initialized constant CLIPPED_PRINT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:62: warning: already initialized constant DEFAULT_EXCEPTION_HANDLER
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:68: warning: already initialized constant DEFAULT_EXCEPTION_WHITELIST
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:71: warning: already initialized constant DEFAULT_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:82: warning: already initialized constant SIMPLE_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:84: warning: already initialized constant SHELL_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:91: warning: already initialized constant NAV_PROMPT
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:107: warning: already initialized constant DEFAULT_CONTROL_D_HANDLER
/home/humberto/.rvm/gems/ruby-1.9.3-p327/gems/pry-0.9.9.6/lib/pry.rb:121: warning: already initialized constant DEFAULT_SYSTEM
rake aborted!
cannot load such file -- pry/nav
(See full trace by running task with --trace)
I've already run bundle install and it worked succesfull. Do someone know what is missing here? Thanks since now.
You should try re-running it within a bundler context:
bundle exec rake db
Bundle exec loads bundler first and hooks all of the gems into the current environment before rake is loaded.

Rake error :warning: already initialized constant MAJOR [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Problem to run comand rake
yulong#ubuntu:~/depotnew$ rake db:migrate
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:28:
warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList
/home/yulong/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep
After i input:bundle exec bash,it works, why??
See my answer on the question “Stack level too deep” running rake db:create:all, it sounds like a similar problem with the same solution.

What is this Routing Error and rake routes error?

I am new to Ruby on Rails.
After fiddling around with it for a week I decided to give it ago, bought a book. Reinstalled it all. And now when I thought I fixed it, I get an error saying:
Routing Error
No route matches "/index"
So I did
rake routes
And that resulted in the error list below.
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:4:
warning: already initialized constant MAJOR
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:5:
warning: already initialized constant MINOR
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:6:
warning: already initialized constant BUILD
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:3:
warning: already initialized constant NUMBERS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:9:
warning: already initialized constant VERSION
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:26:
warning: already initialized constant RAKEVERSION
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/early_time.rb:17:
warning: already initialized constant EARLY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/alt_system.rb:32:
warning: already initialized constant WINDOWS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/application.rb:28:
warning: already initialized constant DEFAULT_RAKEFILES WARNING:
Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already
exists
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/task_arguments.rb:73:
warning: already initialized constant EMPTY_TASK_ARGS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49:
warning: already initialized constant EMPTY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_utils.rb:10:
warning: already initialized constant RUBY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_utils.rb:84:
warning: already initialized constant LN_SUPPORTED
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143:
warning: already initialized constant Commands
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:44:
warning: already initialized constant ARRAY_METHODS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:47:
warning: already initialized constant MUST_DEFINE
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:51:
warning: already initialized constant MUST_NOT_DEFINE
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:55:
warning: already initialized constant SPECIAL_RETURN
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:61:
warning: already initialized constant DELEGATING_METHODS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:364:
warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:370:
warning: already initialized constant DEFAULT_IGNORE_PROCS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:64:
warning: already initialized constant FileList
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:65:
warning: already initialized constant RakeFileUtils rake aborted!
stack level too deep
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_module.rb:25
Try to install an older version of rake.
gem install rake -v=0.8.7
You might get a warning message when using rake.
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
You can just add "include Rake::DSL" to the Rakefile before the applications load_tasks were called.
I found a post to fix that issue.
Global access to Rake DSL methods is deprecated

rake db:create Not working

When i execute "rake db:create" command, I got following Errors
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/application.rb:28: warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList
/home/shamithc/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep
/home/shamithc/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/rake_module.rb:25
How can resolve this problem .....
The rake version bundled with your Ruby version is conflicting with the rake gem. Uninstall rake gem by doing
$ gem uninstall rake -a
Then execute the command again.

Unable to run rake db:migrate

I new to rails,
i've done all steps from this tutorial http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac on my ubuntu 11.04 but i'm unable to run rake db:migrate.
It gives to this output:
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:4: warning: already initialized constant MAJOR
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:5: warning: already initialized constant MINOR
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:6: warning: already initialized constant BUILD
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:3: warning: already initialized constant NUMBERS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/version.rb:9: warning: already initialized constant VERSION
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:26: warning: already initialized constant RAKEVERSION
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/early_time.rb:17: warning: already initialized constant EARLY
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/alt_system.rb:32: warning: already initialized constant WINDOWS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/application.rb:28: warning: already initialized constant DEFAULT_RAKEFILES
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/task_arguments.rb:73: warning: already initialized constant EMPTY_TASK_ARGS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49: warning: already initialized constant EMPTY
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143: warning: already initialized constant Commands
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:44: warning: already initialized constant ARRAY_METHODS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:47: warning: already initialized constant MUST_DEFINE
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:51: warning: already initialized constant MUST_NOT_DEFINE
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:55: warning: already initialized constant SPECIAL_RETURN
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:61: warning: already initialized constant DELEGATING_METHODS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:364: warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake/file_list.rb:370: warning: already initialized constant DEFAULT_IGNORE_PROCS
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:64: warning: already initialized constant FileList
/home/breedish/.rvm/gems/ruby-1.9.2-p290#global/gems/rake-0.9.2/lib/rake.rb:65: warning: already initialized constant RakeFileUtils
rake aborted!
stack level too deep
How can i fix rake to run my initial migration
I have 1.9.2 ruby, 3.0.10 rails
thx for any help
I ran into this error recently too. Resolved it by placing bundle exec in front of the command.
bundle exec rake db:migrate
Here's a previous StackOverflow question with the same error.
And, there's more information about bundle exec here.
Try to install an older version of rake.
gem install rake -v=0.8.7
You might get a warning message when using rake.
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
You can just add "include Rake::DSL" to the Rakefile before the applications load_tasks were called.
I found a post to fix that issue.
Global access to Rake DSL methods is deprecated

Resources