User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2[["id", 2], ["LIMIT", 1]]
User Destroy (2.5ms) DELETE FROM "users" WHERE "users"."id" = $1 [["id", 2]]
Traceback (most recent call last):
1: from (irb):8
ActiveRecord::InvalidForeignKey (PG::ForeignKeyViolation: ERROR: update or delete on table "users" violates foreign key constraint "fk_rails_40ebb3948d" on table "blogs")
DETAIL: Key (id)=(2) is still referenced from table "blogs".
: DELETE FROM "users" WHERE "users"."id" = $1
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
current directory: /Users/koichi/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/therubyracer-0.12.3/ext/v8
/Users/koichi/.rbenv/versions/2.3.4/bin/ruby -r ./siteconf20200120-28144-771md0.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
/Users/koichi/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/libv8-188.8.131.52/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 184.108.40.206 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/koichi/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/libv8-220.127.116.11/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
extconf failed, exit code 1
Gem files will remain installed in /Users/koichi/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/therubyracer-0.12.3 for inspection.
Results logged to /Users/koichi/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-19/2.3.0-static/therubyracer-0.12.3/gem_make.out
Versions of the libv8 gem track the version of v8 itself, adding its own point release after the main v8 version. So libv8 18.104.22.168 and 22.214.171.124 both correspond to v8 version 3.11.8. Another way to think about it would be that 126.96.36.199 is the 14th release of the libv8 rubygem based on v8 version 3.11.8
test "should get home" do
get static_pages_home_url ⇨GETリクエストをhomeアクションに対して発行
assert_response :success ⇨リクエストに対するレスポンスは"成功"になるはず
test "should get home" do
assert_select "title", "Home | Ruby on Rails Tutorial Sample App" ⇨titleタグ内に「Home | Ruby on Rails Tutorial Sample App」と言う文字列があるはず
ENV['RAILS_ENV']||='test'requireFile.expand_path('../../config/environment',__FILE__)require'rails/test_help'require"minitest/reporters" ⇦これを追加Minitest::Reporters.use! ⇦これを追加classActiveSupport::TestCase# Setup all fixtures in test/fixtures/*.yml for all tests# in alphabetical order.fixtures:all# Add more helper methods to be used by all tests here...end
# See https://help.github.com/articles/ignoring-files for more about# ignoring files.## If you find yourself ignoring temporary files generated by your# text editor or operating system, you probably want to add# a global ignore instead:# git config --global core.excludesfile '~/.gitignore_global'# Ignore bundler config./.bundle
# Ignore the default SQLite database.
/db/*.sqlite3/db/*.sqlite3-journal# Ignore all logfiles and tempfiles./log/*/tmp/*!/log/.keep!/tmp/.keep# Ignore Byebug command history file..byebug_history# Ignore Spring files./spring/*.pid ⇦これを追加