Fanta
2012-Dec-01 20:22 UTC
Why doesn''t SQLite Database Browser see the changes I am making from console?
I am adding records to a table from a console started with the --sandbox option. From console I can see the changes have been saved, but still the SQLite Database browser shows me an empty table. What am I doing wrong? Following the Ruby on Rails Tutorial<http://ruby.railstutorial.org/book/ruby-on-rails-tutorial>I have done the migration to create the table, both in development and test environment, then added a record to it from the console, but it doesn''t show up in SQLite Database browser. Here the console transcript that makes me believe the new record has been added. What can I do to see the newly added record from the Database browser? Thanks!>*rails console --sandbox*Loading development environment in sandbox (Rails 3.2.9) Any modifications you make will be rolled back on exit irb(main):001:0> *user= User.new name: "Mario Rossi"* *=> #<User id: nil, name: "Mario Rossi", created_at: nil, updated_at: nil>* irb(main):002:0> *user.save* ←[1m←[35m (0.0ms)←[0m SAVEPOINT active_record_1 ←[1m←[36mSQL (66.0ms)←[0m ←[1mINSERT INTO "users" ("created_at", "name", "updated_at") VALUES (?, ?, ?)←[0m [["created_at", Sat, 01 Dec 2012 20:18:35 UTC +00:00], ["name", "Mario Rossi"], ["update d_at", Sat, 01 Dec 2012 20:18:35 UTC +00:00]] ←[1m←[35m (0.0ms)←[0m RELEASE SAVEPOINT active_record_1 *=> true* irb(main):003:0> *User.find(1)* ←[1m←[36mUser Load (0.0ms)←[0m ←[1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1←[0m [["id", 1]] *=> #<User id: 1, name: "Mario Rossi", created_at: "2012-12-01 20:18:35", updated_at: "2012-12-01 20:18:35">* irb(main):004:0> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/l1L_QIX3_jQJ. For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2012-Dec-01 20:45 UTC
Re: Why doesn''t SQLite Database Browser see the changes I am making from console?
On Sat, Dec 1, 2012 at 12:22 PM, Fanta <f.g.fanta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am adding records to a table from a console started with the --sandbox > option.> What can I do to see the newly added record from the Database browser?Don''t use --sandbox :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Mohamed Wael Khobalatte
2012-Dec-01 21:00 UTC
Re: Why doesn''t SQLite Database Browser see the changes I am making from console?
In sandbox mode, all your changes are rollbacked once you leave it. On Sat, Dec 1, 2012 at 8:45 PM, Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Dec 1, 2012 at 12:22 PM, Fanta <f.g.fanta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I am adding records to a table from a console started with the --sandbox > > option. > > > What can I do to see the newly added record from the Database browser? > > Don''t use --sandbox :-) > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > http://about.me/hassanschroeder > twitter: @hassan > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Mohamed Wael Khobalatte -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Fanta
2012-Dec-02 13:24 UTC
Re: Why doesn''t SQLite Database Browser see the changes I am making from console?
Thanks. That did the trick. On Saturday, December 1, 2012 9:45:14 PM UTC+1, Hassan Schroeder wrote:> > On Sat, Dec 1, 2012 at 12:22 PM, Fanta <f.g....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> > wrote: > > I am adding records to a table from a console started with the --sandbox > > option. > > > What can I do to see the newly added record from the Database browser? > > Don''t use --sandbox :-) > > -- > Hassan Schroeder ------------------------ hassan.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > http://about.me/hassanschroeder > twitter: @hassan >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/wqSosIzZBwAJ. For more options, visit https://groups.google.com/groups/opt_out.