Note that there are some explanatory texts on larger screens.

plurals
  1. PORails console does not send any output to the development.log
    primarykey
    data
    text
    <p>I am using <code>Rails 3.2.13</code></p> <p>More specifically, whenever I do a <code>item.destroy</code> via the console....it doesn't send the output to my <code>development.log</code>.</p> <p>E.g.:</p> <pre><code>&gt; note = Item.last Item Load (31.0ms) SELECT "items".* FROM "items" ORDER BY "items"."id" DESC LIMIT 1 =&gt; #&lt;Item id: 10, name: "Notepad", link: "Notepad-in-CSS---HTML.zip", description: "Awesome notepad piece of paper.", price: 10.0, user_id: 2, created_at: "2013-05-05 21:22:47", updated_at: "2013-05-05 21:22:47", image: "notepad.png"&gt; 2.0.0p0 :051 &gt; note =&gt; #&lt;Item id: 10, name: "Notepad", link: "Notepad-in-CSS---HTML.zip", description: "Awesome notepad piece of paper.", price: 10.0, user_id: 2, created_at: "2013-05-05 21:22:47", updated_at: "2013-05-05 21:22:47", image: "notepad.png"&gt; 2.0.0p0 :052 &gt; note.destroy (0.1ms) BEGIN SQL (0.5ms) DELETE FROM "items" WHERE "items"."id" = $1 [["id", 10]] (70.8ms) COMMIT =&gt; #&lt;Item id: 10, name: "Notepad", link: "Notepad-in-CSS---HTML.zip", description: "Awesome notepad piece of paper.", price: 10.0, user_id: 2, created_at: "2013-05-05 21:22:47", updated_at: "2013-05-05 21:22:47", image: "notepad.png"&gt; &gt; Item.count (13.3ms) SELECT COUNT(*) FROM "items" =&gt; 0 </code></pre> <p>But here are the last entries of my <code>development.log</code> which just shows the creation of the <code>note</code> Item I used in the console above. But it doesn't show any of the operations I did in the console above.</p> <pre><code>Started GET "/items" for 127.0.0.1 at 2013-05-05 16:19:58 -0500 Processing by ItemsController#index as HTML [1m[36mItem Load (0.5ms)[0m [1mSELECT "items".* FROM "items" [0m Rendered items/index.html.erb within layouts/item (0.7ms) [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 [1m[36m (1.0ms)[0m [1mSELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL)))[0m [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'seller') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) Rendered layouts/_site_nav.html.erb (11.3ms) Rendered layouts/_messages.html.erb (0.1ms) Rendered layouts/_footer.html.erb (0.1ms) Completed 200 OK in 583ms (Views: 579.5ms | ActiveRecord: 2.7ms) Started GET "/items/new" for 127.0.0.1 at 2013-05-05 16:22:11 -0500 Processing by ItemsController#new as HTML Rendered items/_form.html.erb (12.1ms) Rendered items/new.html.erb within layouts/item (13.9ms) [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1[0m [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'seller') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL)))[0m Rendered layouts/_site_nav.html.erb (10.1ms) Rendered layouts/_messages.html.erb (0.2ms) Rendered layouts/_footer.html.erb (0.1ms) Completed 200 OK in 721ms (Views: 718.2ms | ActiveRecord: 1.9ms) Started POST "/items" for 127.0.0.1 at 2013-05-05 16:22:47 -0500 Processing by ItemsController#create as HTML Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"kelL30xMc/=", "item"=&gt;{"name"=&gt;"Notepad", "link"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x007e18 @original_filename="Notepad-in-CSS---HTML.zip", @content_type="application/zip", @headers="Content-Disposition: form-data; name=\"item[link]\"; filename=\"Notepad-in-CSS---HTML.zip\"\r\nContent-Type: application/zip\r\n", @tempfile=#&lt;Tempfile:/var/folders/0f/hgpl/T/RackMultipart20130505-36246-1xmqytf&gt;&gt;, "image"=&gt;#&lt;ActionDispatch::Http::UploadedFile:0x007fa65cfc4f18 @original_filename="notepad.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"item[image]\"; filename=\"notepad.png\"\r\nContent-Type: image/png\r\n", @tempfile=#&lt;Tempfile:/var/folders/0f/000gn/T/RackMultipart21n9jo5w&gt;&gt;, "price"=&gt;"10", "description"=&gt;"Awesome notepad piece of paper."}, "_wysihtml5_mode"=&gt;"1", "commit"=&gt;"Create Item"} [1m[35mUser Load (1.9ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35mSQL (373.1ms)[0m INSERT INTO "items" ("created_at", "description", "image", "link", "name", "price", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", Sun, 05 May 2013 21:22:47 UTC +00:00], ["description", "Awesome notepad piece of paper."], ["image", "notepad.png"], ["link", "Notepad-in-CSS---HTML.zip"], ["name", "Notepad"], ["price", 10.0], ["updated_at", Sun, 05 May 2013 21:22:47 UTC +00:00], ["user_id", 2]] Store! is executed Store! is executed [1m[36m (162.5ms)[0m [1mCOMMIT[0m Redirected to http://localhost:3000/items/10 Completed 302 Found in 3362ms (ActiveRecord: 537.6ms) Started GET "/items/10" for 127.0.0.1 at 2013-05-05 16:22:50 -0500 Processing by ItemsController#show as HTML Parameters: {"id"=&gt;"10"} [1m[35mItem Load (1.3ms)[0m SELECT "items".* FROM "items" WHERE "items"."id" = $1 LIMIT 1 [["id", "10"]] [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1[0m Rendered items/show.html.erb within layouts/item (4.0ms) [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1 [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'admin') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL)))[0m [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "roles" INNER JOIN "users_roles" ON "roles"."id" = "users_roles"."role_id" WHERE "users_roles"."user_id" = 2 AND (((roles.name = 'seller') AND (roles.resource_type IS NULL) AND (roles.resource_id IS NULL))) Rendered layouts/_site_nav.html.erb (9.2ms) Rendered layouts/_messages.html.erb (0.2ms) Rendered layouts/_footer.html.erb (0.1ms) Completed 200 OK in 1259ms (Views: 1253.6ms | ActiveRecord: 3.0ms) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload