Hello,
I''m using the newest "Agile Web Development With Rails"
book and
the Ruby command line call near the end of p. 267 is:
sqlite3 -line db/development.sqlite3 "select * from orders limit 1"
and this, (with my own table, which has data which was verified by
looking at the WEBRick output in a browser) gives the error:
sqlite3 is not recognized as an internal or external command, operable
program or batch file.
But, sqlite3 is installed and working (by Web verification) and also
the rails console works and shows me the column_names, etc. Also,
sqlite3.dll exists in c:\ruby192\bin\ and that path is in my
environment PATH variable. I''m using Windows XP.
What am I forgetting to do?
Thanks,
Barney
--
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 this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Barney, I think you have to enter the sqlite shell if you want to run those types of commands (e.g., select * etc...). Run sqlite on the "development" db, try this: $ cd [app_name] $ cd db/ # your development.sqlite3 file should be here... $ sqlite development.sqlite3 # now the sqlite shell should boot Now you can run your SQL commands: $ sqlite> select * from orders limit 1 See generally http://www.sqlite.org/sqlite.html -Rodrigo On Jul 12, 1:05 pm, Barney <bsper...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > I''m using the newest "Agile Web Development With Rails" book and > the Ruby command line call near the end of p. 267 is: > sqlite3 -line db/development.sqlite3 "select * from orders limit 1" > and this, (with my own table, which has data which was verified by > looking at the WEBRick output in a browser) gives the error: > sqlite3 is not recognized as an internal or external command, operable > program or batch file. > But, sqlite3 is installed and working (by Web verification) and also > the rails console works and shows me the column_names, etc. Also, > sqlite3.dll exists in c:\ruby192\bin\ and that path is in my > environment PATH variable. I''m using Windows XP. > What am I forgetting to do? > Thanks, > Barney-- 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. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks, Rodrigo, but I put the \db\ directory into the Path and tried
the call in both the Ruby command line and a regular command line from
that directory where I have development.sqlite3, trying both "sqlite"
and "sqlite3" as the call at the beginning of the line, but I get the
same error that they still aren''t recognized as a command. What else
could I be forgetting to do?
Barney
On Jul 12, 1:14 pm, Rodrigo
<joserodrigofuen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Barney,
>
> I think you have to enter the sqlite shell if you want to run those
> types of commands (e.g., select * etc...).
>
> Run sqlite on the "development" db, try this:
>
> $ cd [app_name]
> $ cd db/ # your development.sqlite3 file should be here...
> $ sqlite development.sqlite3 # now the sqlite shell should boot
>
> Now you can run your SQL commands:
>
> $ sqlite> select * from orders limit 1
>
> See generallyhttp://www.sqlite.org/sqlite.html
>
> -Rodrigo
>
> On Jul 12, 1:05 pm, Barney
<bsper...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Hello,
> > I''m using the newest "Agile Web Development With
Rails" book and
> > the Ruby command line call near the end of p. 267 is:
> > sqlite3 -line db/development.sqlite3 "select * from orders limit
1"
> > and this, (with my own table, which has data which was verified by
> > looking at the WEBRick output in a browser) gives the error:
> > sqlite3 is not recognized as an internal or external command, operable
> > program or batch file.
> > But, sqlite3 is installed and working (by Web verification) and also
> > the rails console works and shows me the column_names, etc. Also,
> > sqlite3.dll exists in c:\ruby192\bin\ and that path is in my
> > environment PATH variable. I''m using Windows XP.
> > What am I forgetting to do?
> > Thanks,
> > Barney
--
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.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Answering my own question now, I followed your link and it said to use
"sqlite3.exe" in the call so I tried it but it still didn''t
work.
Then I searched for sqlite3.exe and found one in a Java directory.
Putting its location in the path didn''t help. When I copied that exe
to the \db\ directory and called: "sqlite3.exe development.sqlite3"
then I got into the sqlite3 command shell and was able to do: select *
from people; and it worked.
Now, the only question is: Is that the wrong way to go about it
and will I regret cluttering up the \db\ directory that way?
Thanks for the pointers,
Barney
On Jul 12, 1:41 pm, Barney
<bsper...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Thanks, Rodrigo, but I put the \db\ directory into the Path and tried
> the call in both the Ruby command line and a regular command line from
> that directory where I have development.sqlite3, trying both
"sqlite"
> and "sqlite3" as the call at the beginning of the line, but I get
the
> same error that they still aren''t recognized as a command. What
else
> could I be forgetting to do?
> Barney
>
> On Jul 12, 1:14 pm, Rodrigo
<joserodrigofuen...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Barney,
>
> > I think you have to enter the sqlite shell if you want to run those
> > types of commands (e.g., select * etc...).
>
> > Run sqlite on the "development" db, try this:
>
> > $ cd [app_name]
> > $ cd db/ # your development.sqlite3 file should be here...
> > $ sqlite development.sqlite3 # now the sqlite shell should boot
>
> > Now you can run your SQL commands:
>
> > $ sqlite> select * from orders limit 1
>
> > See generallyhttp://www.sqlite.org/sqlite.html
>
> > -Rodrigo
>
> > On Jul 12, 1:05 pm, Barney
<bsper...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > > Hello,
> > > I''m using the newest "Agile Web Development
With Rails" book and
> > > the Ruby command line call near the end of p. 267 is:
> > > sqlite3 -line db/development.sqlite3 "select * from orders
limit 1"
> > > and this, (with my own table, which has data which was verified
by
> > > looking at the WEBRick output in a browser) gives the error:
> > > sqlite3 is not recognized as an internal or external command,
operable
> > > program or batch file.
> > > But, sqlite3 is installed and working (by Web verification) and
also
> > > the rails console works and shows me the column_names, etc.
Also,
> > > sqlite3.dll exists in c:\ruby192\bin\ and that path is in my
> > > environment PATH variable. I''m using Windows XP.
> > > What am I forgetting to do?
> > > Thanks,
> > > Barney
--
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.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jul 12, 2:05 pm, Barney <bsper...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > I''m using the newest "Agile Web Development With Rails" book and > the Ruby command line call near the end of p. 267 is: > sqlite3 -line db/development.sqlite3 "select * from orders limit 1" > and this, (with my own table, which has data which was verified by > looking at the WEBRick output in a browser) gives the error: > sqlite3 is not recognized as an internal or external command, operable > program or batch file. > But, sqlite3 is installed and working (by Web verification) and also > the rails console works and shows me the column_names, etc. Also, > sqlite3.dll exists in c:\ruby192\bin\ and that path is in my > environment PATH variable. I''m using Windows XP. > What am I forgetting to do?Download sqlite3.exe and place in C:\ruby192\bin along the .dll, that should allow dbconsole to work. If not, you can still do "sqlite3 db/development.sqlite3" and be able to run SQL statements there. -- Luis Lavena -- 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. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.