rake assets precompile aborted with rails 3.2.11 - ruby-on-rails-3

I have to run rake assets:precompile command before deploying in rackspace server, recently upgraded rails version from 3.2.9 to 3.2.11 due to the security patch and Upgraded JSON GEM.
I get the following error and rake abort.
$> rake assets:precompile --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Command failed with status (): [/usr/local/rvm/rubies/ruby-1.9.3-p385/bin/...]
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/lib/rake /file_utils.rb:53:in `block in create_shell_runner'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/lib/rake/file_utils.rb:45:in `sh'
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.11/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.11/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/usr/local/rvm/gems/ruby-1.9.3-p385/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p385#global/bin/rake:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
Any solution for this ?

May be memory issue?
Try upgrading the RAM in VPS

Related

cap stopped working missing bin file

capistrano was working fine, I don't know what I changed, but now I get this:
(cap3, rails4, using capistrano-rvm)
$ cap production deploy --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke bundler:map_bins (first_time)
** Execute bundler:map_bins
** Invoke deploy:set_rails_env (first_time)
** Execute deploy:set_rails_env
** Invoke deploy:set_rails_env
** Invoke rvm:hook (first_time)
** Execute rvm:hook
** Invoke rvm:check (first_time)
** Execute rvm:check
DEBUG [954551b1] Running ~/.rvm/bin/rvm version as myuser#myip
DEBUG [954551b1] Command: ~/.rvm/bin/rvm version
DEBUG [954551b1] bash: /opt/myuser/.rvm/bin/rvm: No such file or directory
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as myuser#myip: rvm exit status: 127
rvm stdout: Nothing written
rvm stderr: bash: /opt/myuser/.rvm/bin/rvm: No such file or directory
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: rvm exit status: 127
rvm stdout: Nothing written
rvm stderr: bash: /opt/myuser/.rvm/bin/rvm: No such file or directory
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:77:in `capture'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:9:in `block (3 levels) in <top (required)>'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/joelnylund/.rvm/gems/ruby-2.0.0-p353/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => rvm:check
At some point I did install a new ruby, but that seemed to work fine, rvm works fine on the server:
$ which rvm
/usr/local/rvm/bin/rvm
and:
$ rvm list
rvm rubies
=* ruby-2.0.0-p643 [ x86_64 ]
ruby-2.1.2 [ x86_64 ]
I have tried adding to deploy.rb :
set :rvm_type, 'system' set :rvm_bin_path, '/usr/local/rvm/bin/'
Any ideas?

invalid byte sequence in US-ASCII during assets:precompile

I can no longer deploy my app because of an UTF error, here is the trace :
/srv/outils/www/railsapp/releases/20140414151455$ cd -- /srv/outils/www/railsapp/releases/20140414151455 && RAILS_ENV=prodtest RAILS_GROUPS=assets bundle exec rake assets:precompile --trace
rake aborted!
rake aborted!
invalid byte sequence in US-ASCII
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/trace_output.rb:16:in `block in trace_on'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/trace_output.rb:14:in `map'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/trace_output.rb:14:in `trace_on'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:340:in `trace'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:187:in `display_error_message'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:174:in `rescue in standard_exception_handling'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/bin/rake:23:in `load'
/srv/outils/www/railsapp/shared/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
The LANG variable is set to fr_FR.UTF-8.
What bother me is that which ruby gives me :
/home/admin/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
I installed a rvm gem and now i have exactly the same error with the correct RVM path.
I tried :
Adding #encoding UTF-8 everywhere
Added :
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
Checked $LANG on my server
Removed any éè etc.. from my previous commits
EDIT : Migrated from ruby 1.9.3 to 2.1
Where to go now to investigate this problem?

assets:precompile stack level too deep

I'm trying to have success on running the task rake assets:precompile but I have the following error
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
stack level too deep
(in .../app/assets/stylesheets/admin/scaffolds.css.scss)
.....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:162
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/diogui/.rvm/rubies/ruby-1.9.2-p320/...]
.....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
.....rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
.....rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.1/lib/sprockets/assets.rake:9:in `ruby_rake_task'
....rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.1.1/lib/sprockets/assets.rake:17:in ` invoke_or_reboot_rake_task'
In my production.rb I have
config.serve_static_assets = false
config.assets.enabled = true
config.assets.compress = true
config.assets.compile = true
config.assets.digest = true
Yes I have Sass 3.1.4
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
Does anybody have an idea what is the problem ? Or what am I missing ? Thanks :)
It turns out this is a documented issue with the sass-rails gem: https://github.com/rails/sass-rails/issues/78
It can apparently be solved by downgrading the sass-rails gem to 3.1.4 (if you're on Rails 3.1) or upgrading to 3.2.5 (if you're on Rails 3.2): "rake aborted! stack level too deep" while deploying to Heroku
This worked for me :)
Changing the ruby version to 2.3.0 did the trick.
This one saved my day.

rake gives an error about an uninitialized constant Consolidated

I am trying to build a rails app written by a friend of mine and when I run rake db:setup I get the following error - I am running on debian using rvm to run ruby 1.9.2 and rails 3.1.0 Can anyone point me in the right directon to solve this? Why is the migration trying to use a constant thats undefined? Do I need to define it somewhere? I am not a rails dev so this has me stumped.
$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
rake aborted!
An error has occurred, this and all later migrations canceled:
uninitialized constant Consolidated
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:124:in `block in constantize'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:123:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0/lib/active_support/inflector/methods.rb:123:in `constantize'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.1.0/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:517:in `load_migration'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:512:in `migration'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:507:in `migrate'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:687:in `block (2 levels) in migrate'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:742:in `call'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:742:in `block in ddl_transaction'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/transactions.rb:208:in `transaction'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:742:in `ddl_transaction'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:686:in `block in migrate'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:671:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:671:in `migrate'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:549:in `up'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/migration.rb:530:in `migrate'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:161:in `block (2 levels) in <top (required)>'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/andrew/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `load'
/home/andrew/.rvm/gems/ruby-1.9.2-p136/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate

Issues implementing Rspec with Rails3 from tutorial

I am a newbie to Rails 3 and Rspec. Kindly excuse my being a novice.
I am trying to implement RSpec with Rails 3. I am using Rails 3.0.3 with Ruby 1.9.2 on Ubuntu 10.04 os. I am using rspec 2.5 gem and rspec-rails 2.5 gem.
I am referring to the following tutorial:-
http://www.railsfire.com/article/rspec-behaviour-driven-development-testing-framework
This tutorial is implemented on Rails 2.x with an older version of rspec and rspec-rails.
I tried to implement exactly the same tutorial with my configuration, but I have run into some issues. I am unable to figure out what I must have done wrong.
I am sure about one thing that I am not using the rails_scaffold generator as used in this tutorial. Instead of using the rails_scaffold generator, I made use of the following command rails g scaffold post title:string body:text
I don't seem to have it(rspec_scaffold) in my list of generators which as part of Rails 3 and the additional ones that will come with Rspec.
The error I am getting is :-
mohnish#mohnish-desktop:~/rails_testing/10Mar11/rspec_demo5$ rake spec
(in /home/mohnish/rails_testing/10Mar11/rspec_demo5)
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
(See full trace by running task with --trace)
mohnish#mohnish-desktop:~/rails_testing/10Mar11/rspec_demo5$ rake spec --trace
(in /home/mohnish/rails_testing/10Mar11/rspec_demo5)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:429:in `block (3 levels) in <top (required)>'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/home/mohnish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/home/mohnish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.3/lib/active_record/railties/databases.rake:460:in `block (3 levels) in <top (required)>'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/home/mohnish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/home/mohnish/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/home/mohnish/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
mohnish#mohnish-desktop:~/rails_testing/10Mar11/rspec_demo5$
Any suggestions on what I must be doing wrong and how to fix the same. Kindly help.
Thank you very much.
I made a fundamental mistake, I realized that I always made use of rake db:create, and rake db:migrate. This would set things for me with
Development Environment. For the test enviroment, I had to use rake db:test:prepare or rake db:migrate with appropriate syntax to reflect
the migrations in the Test Environment.