-
-
Save vincentpaca/1549790 to your computer and use it in GitHub Desktop.
pax@ubuntu:~/projects/missionhub$ ruby -v | |
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] | |
pax@ubuntu:~/projects/missionhub$ rails -v | |
Rails 3.1.3 | |
pax@ubuntu:~/projects/missionhub$ rake -V | |
rake, version 0.9.2.2 | |
pax@ubuntu:~/projects/missionhub$ bundle exec rake db:migrate --trace | |
DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0 | |
** 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 | |
** Invoke db:schema:dump (first_time) | |
** Invoke environment | |
** Invoke db:load_config | |
** Execute db:schema:dump | |
/home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: db:migrate (ArgumentError) | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:146:in `map!' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:146:in `non_options' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:207:in `non_options' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:52:in `process_args' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:884:in `run' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:27:in `run_once' | |
from /home/pax/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun' | |
#----------------------------- | |
pax@ubuntu:~/projects/missionhub$ ruby -v | |
ruby 1.9.2p271 (2011-05-31 revision 31856) [i686-linux] | |
pax@ubuntu:~/projects/missionhub$ rails -v | |
Rails 3.1.3 | |
pax@ubuntu:~/projects/missionhub$ bundle exec rake -V | |
rake, version 0.9.2.2 | |
pax@ubuntu:~/projects/missionhub$ bundle exec rake db:migrate | |
DEPRECATION WARNING: Yajl's JSON gem compatibility API is going to be removed in 2.0 | |
Loaded suite /home/pax/.rvm/gems/ruby-1.9.2-p180@missionhub/bin/rake | |
Started | |
Finished in 0.001118 seconds. | |
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips | |
Test run options: --seed 51475 |
Like beanieboi, I used shoulda which produces this error. I found that the require 'test/unit'
call used in shoulda 2.11.3 and shoulda-context re-runs tests on Ruby 1.9.3. If I comment this line, it seems to work (I tested that with shoulda only).
For now, I fixed the issue by removing shoulda from my Gemfile and by including the code I need from shoulda-context. It's quite ugly, but I'll try to find a better way.
Thank you for the link which helps me.
I have the same problem and have verified it's a problem with shoulda interaction.
I also ran into this issue - removing shoulda fixed it. Many thanks!
It's worth pointing out that declaring :require => false
in your Gemfile will avoid this problem:
gem "shoulda", :require => false
Then just make sure you require "shoulda"
in your spec helper file.
Yes. It helped! Thank you!
This was helpful. Thank you!
cool~ flavorjones' solution works quite well.
I ran into this issue with flexmock as well--same fix
Hey,
I figured that with regards to tasks, db migration etc., 1.9.3 looks like it blew up and failed to finish the task but it actually completed.
I tried to do rake db:migrate on mine, it still showed the same 'block in non_options' error but actually it finished the migration.
Have you seen this?
jimweirich/rake#51
I still haven't found a way to fix these errors though.