Skip to content

Instantly share code, notes, and snippets.

@zonoise
Created November 11, 2010 03:56
Show Gist options
  • Save zonoise/671975 to your computer and use it in GitHub Desktop.
Save zonoise/671975 to your computer and use it in GitHub Desktop.
undefined method `use_transactional_fixtures='
#twitter という名前のgem(http://twitter.rubyforge.org/)の
#サンプルアプリ(https://github.com/jnunemaker/twitter-app/)を動かそうとしているんだけど、
#rake test:units したところ、undefined method `use_transactional_fixtures='
#というエラーが出てハマっている。
#あと、database.ymlがない。
user0@user0-desktop:~/dev/ruby/tmp/twitter-app$ rake test:units
(in /home/user0/dev/ruby/tmp/twitter-app)
/usr/bin/ruby1.8 -I"lib:test" "/home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/helpers/statuses_helper_test.rb" "test/unit/helpers/direct_messages_helper_test.rb" "test/unit/helpers/friendships_helper_test.rb" "test/unit/user_test.rb"
./test/test_helper.rb:8: undefined method `use_transactional_fixtures=' for ActiveSupport::TestCase:Class (NoMethodError)
from ./test/unit/helpers/statuses_helper_test.rb:1:in `require'
from ./test/unit/helpers/statuses_helper_test.rb:1
from /home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
from /home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from /home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
from /home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:test" "/home/user0...]
#./test/test_helper.rb
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
require 'matchy'
require 'mocha'
class ActiveSupport::TestCase
self.use_transactional_fixtures = true #<=ここでエラーが出ているが、
self.use_instantiated_fixtures = false
fixtures :all
end
#gem list
*** LOCAL GEMS ***
aasm (2.2.0)
abstract (1.0.0)
actionmailer (3.0.0, 2.3.10, 2.3.8, 2.3.5)
actionpack (3.0.0, 2.3.10, 2.3.8, 2.3.5)
activemodel (3.0.0)
activerecord (3.0.0, 2.3.10, 2.3.8, 2.3.5)
activeresource (3.0.0, 2.3.10, 2.3.8, 2.3.5)
activesupport (3.0.0, 2.3.10, 2.3.8, 2.3.5)
arel (1.0.1)
authlogic (2.1.6)
builder (2.1.2)
bundler (1.0.2)
chronic (0.3.0)
configuration (1.1.0)
crack (0.1.8, 0.1.6)
cucumber (0.9.2)
cucumber-rails (0.3.2)
database_cleaner (0.6.0)
diff-lcs (1.1.2)
erubis (2.6.6)
faker (0.3.1)
ffi (0.6.3)
gettext (2.1.0, 1.93.0)
gherkin (2.2.9)
hashie (0.4.0, 0.2.2)
heroku (1.10.14)
httparty (0.6.1, 0.5.2)
i18n (0.4.1)
i18n_generators (1.0.0.pre1)
jeremydurham-restful_authentication (1.1.7)
jnunemaker-matchy (0.4.0)
json (1.4.6)
json_pure (1.4.6)
launchy (0.3.7)
locale (2.0.5)
machinist (1.0.6)
mail (2.2.7)
mime-types (1.16)
mocha (0.9.9)
multi_json (0.0.5)
nokogiri (1.4.3.1)
oauth (0.4.4, 0.3.6)
packet (0.1.15)
polyglot (0.3.1)
postgres-pr (0.6.3)
rack (1.2.1, 1.1.0, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (2.3.10, 2.3.8, 2.3.5)
railties (3.0.0)
rake (0.8.7)
rest-client (1.6.1)
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
rspec-rails (2.0.1)
ruby-hmac (0.4.0)
sequel (3.15.0)
sinatra (1.0)
sqlite3-ruby (1.3.1, 1.2.4)
taps (0.3.13)
term-ansicolor (1.0.5)
thor (0.14.3)
thoughtbot-factory_girl (1.2.2, 1.2.0)
thoughtbot-shoulda (2.10.0)
treetop (1.4.8)
twitter (0.9.12, 0.9.1)
tzinfo (0.3.23)
webrat (0.7.2)
yaml_waml (0.3.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment