Debug

With the Rails, I build a project connecting the MySQL. But When I change
the password access in database. I can not access in the project. Then I
check the database.yml file. And change the username and password. But it
does not work.
So ......
I do not know how to resolve this problem?

···

--
Best Regards
Cooper Geng

coolgeng coolgeng wrote:

With the Rails, I build a project connecting the MySQL. But When I change
the password access in database. I can not access in the project. Then I
check the database.yml file. And change the username and password. But it
does not work.
So ......
I do not know how to resolve this problem?

Can't see your code, so here's some generic tips:

Log into mysql the same way Rails would:

   mysql -u my_name -pmy_password my_database

Next, if MySQL is on the same 'localhost' as your site, log in as root:

   mysql -u root my_database

If that works, just use root, with no password, in the YML file.

Next, write unit tests, and direct them to another database in the same server. Unit tests are how Rails projects "debug" their features.

Next, read the files in your log/ folder to see if any error messages arrived there.

···

--
  Phlip
  Test Driven Ajax (on Rails) [Book]
  "Test Driven Ajax (on Rails)"
  assert_xpath, assert_javascript, & assert_ajax

Hi

Did you restart the server?

···

2007/9/13, coolgeng coolgeng <coolgeng410@gmail.com>:

With the Rails, I build a project connecting the MySQL. But When I change
the password access in database. I can not access in the project. Then I
check the database.yml file. And change the username and password. But it
does not work.
So ......
I do not know how to resolve this problem?

--
Best Regards
Cooper Geng

When I redirect to the Welcome to Rails page, I click the "About your
application's enviroment"
It shows:

Status: 500 Internal Server Error Content-Type: text/html Application error
(Apache)

Change this error message for exceptions thrown outside of an action (like
in Dispatcher setups or broken Ruby code) in public/500.html

···

On 9/13/07, coolgeng coolgeng <coolgeng410@gmail.com> wrote:

With the Rails, I build a project connecting the MySQL. But When I change
the password access in database. I can not access in the project. Then I
check the database.yml file. And change the username and password. But it
does not work.
So ......
I do not know how to resolve this problem?

--
Best Regards
Cooper Geng

--
Best Regards
Cooper Geng

Yeah,I have restart the server. But it can not fix it..

···

On 9/13/07, Eugene Bolshakov <eugene.bolshakov@gmail.com> wrote:

Hi

Did you restart the server?

2007/9/13, coolgeng coolgeng <coolgeng410@gmail.com>:
> With the Rails, I build a project connecting the MySQL. But When I
change
> the password access in database. I can not access in the project. Then I
> check the database.yml file. And change the username and password. But
it
> does not work.
> So ......
> I do not know how to resolve this problem?
>
>
> --
> Best Regards
> Cooper Geng
>

--
Best Regards
Cooper Geng

I check the development.log, and it says : "Mysql::Error: #42S02Table
'depot_development.sessions' doesn't exist: SHOW FIELDS FROM sessions"

···

On 9/17/07, coolgeng coolgeng <coolgeng410@gmail.com> wrote:

When I redirect to the Welcome to Rails page, I click the "About your
application's enviroment"
It shows:

Status: 500 Internal Server Error Content-Type: text/html Application
error
(Apache)

Change this error message for exceptions thrown outside of an action (like
in Dispatcher setups or broken Ruby code) in public/500.html

On 9/13/07, coolgeng coolgeng <coolgeng410@gmail.com> wrote:
>
> With the Rails, I build a project connecting the MySQL. But When I
change
> the password access in database. I can not access in the project. Then I
> check the database.yml file. And change the username and password. But
it
> does not work.
> So ......
> I do not know how to resolve this problem?
>
>
> --
> Best Regards
> Cooper Geng
>

--
Best Regards
Cooper Geng

--
Best Regards
Cooper Geng

Yeah,I have restart the server. But it can not fix it..

Did you try my checklist?

Learn what you are actually doing:

And ask the specialists:

···

-----Original Message-----
From: coolgeng coolgeng [mailto:coolgeng410@gmail.com]
Sent: Monday, September 17, 2007 4:15 AM
To: ruby-talk ML
Subject: Re: Debug

I check the development.log, and it says : "Mysql::Error: #42S02Table
'depot_development.sessions' doesn't exist: SHOW FIELDS FROM sessions"

Have a look at config/environment.rb:

   ...
   # Use the database for sessions instead of the file system
   # (create the session table with 'rake db:sessions:create')
   config.action_controller.session_store = :active_record_store
   ...

If you activate config.action_controller.session_store above, you should
do 'rake db:sessions:create' first. If you don't want to use MySQL table
to store session, uncomment above.

···

On Mon, 17 Sep 2007, coolgeng coolgeng wrote:

I check the development.log, and it says : "Mysql::Error: #42S02Table
'depot_development.sessions' doesn't exist: SHOW FIELDS FROM sessions"

--

Key fingerprint FBBA CDA6 1A33 D41C 2470 5B82 12D9 DB12 84C7 32CE
Key server ldap://pgp.surfnet.nl:11370 & hkp://subkeys.pgp.net
ID 0x84C732CE

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

I can access the database following the "mysql -u root my_database" . But
there is still some problem.

F:\work\depot>ruby script/server
./script/../config/boot.rb:43:Warning: require_gem is obsolete. Use gem
instead
.
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel available at 0.0.0.0:3000
** Use CTRL-C to stop.

···

On 9/14/07, Phlip <phlip2005@gmail.com> wrote:

> Yeah,I have restart the server. But it can not fix it..

Did you try my checklist?

--
Best Regards
Cooper Geng

Thanks a lot. When I disabled this line, the program do work.
But if I would like to reserve this function and not discard this line, what
should I do?

···

On 9/17/07, Bambang Purnomosidi D. P. <bpurnomo@akakom.ac.id> wrote:

On Mon, 17 Sep 2007, coolgeng coolgeng wrote:

> I check the development.log, and it says : "Mysql::Error: #42S02Table
> 'depot_development.sessions' doesn't exist: SHOW FIELDS FROM sessions"

Have a look at config/environment.rb:

   ...
   ...
   # Use the database for sessions instead of the file system
   # (create the session table with 'rake db:sessions:create')
   config.action_controller.session_store = :active_record_store
   ...
   ...

If you activate config.action_controller.session_store above, you should
do 'rake db:sessions:create' first. If you don't want to use MySQL table
to store session, uncomment above.

--
http://bpdp.wordpress.com
Key fingerprint FBBA CDA6 1A33 D41C 2470 5B82 12D9 DB12 84C7 32CE
Key server ldap://pgp.surfnet.nl:11370 & hkp://subkeys.pgp.net
ID 0x84C732CE

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
Best Regards
Cooper Geng

coolgeng coolgeng wrote:

./script/../config/boot.rb:43:Warning: require_gem is obsolete. Use gem
instead

That will say that for a few more versions of Rails, apparently. It is a "warning", which in computer science is a minor error that does not stop a program.

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel available at 0.0.0.0:3000
** Use CTRL-C to stop.

And that is a normal Mongrel startup.

Does your site work? Do your unit tests pass? What is in your log/* folder? Does log/development.log contain the word Error anywhere?

···

--
  Phlip

From this point on it is HIGHLY recommended to buy a book. Especially the Agile Web Development With Rails book.
It's all in there. (not necessarily in the order you might expect, but it's in there)
If you're really new to web development, you should go for the Rails book from SitePoint publishing.
It's a perfect newbie book, but you'll still want to have AWDWR.
Also, do not neglect the Ruby on Rails web site. There is lots of info there too.
The Rails Talk group is also helpful, but you'll do better to go there after you've learnt the basics of Rails.
Don't worry, Rails basics are not that tough. A lot of frameworks in other languages are a LOT more convoluted (sometimes just by the language they're written in)
Oh one more. keep a browser window open to the Rails API !!! It's quite good and extremely useful in learning and more.

but you really should try to keep questions for this list to Ruby specific things.
some Rails stuff is Ruby specific, but so far this isn't.

···

On Sep 16, 2007, at 10:17 PM, coolgeng coolgeng wrote:

Thanks a lot. When I disabled this line, the program do work.
But if I would like to reserve this function and not discard this line, what
should I do?

My site does not work. And what is the meaning of unit tests pass?There is
nothing in my log file.

···

On 9/14/07, Phlip <phlip2005@gmail.com> wrote:

coolgeng coolgeng wrote:

> ./script/../config/boot.rb:43:Warning: require_gem is obsolete. Use gem
> instead

That will say that for a few more versions of Rails, apparently. It is a
"warning", which in computer science is a minor error that does not stop a

program.

> => Booting Mongrel (use 'script/server webrick' to force WEBrick)
> => Rails application starting on http://0.0.0.0:3000
> => Call with -d to detach
> => Ctrl-C to shutdown server
> ** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
> ** Starting Mongrel listening at 0.0.0.0:3000
> ** Starting Rails with development environment...
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
> ** Signals ready. INT => stop (no restart).
> ** Mongrel available at 0.0.0.0:3000
> ** Use CTRL-C to stop.

And that is a normal Mongrel startup.

Does your site work? Do your unit tests pass? What is in your log/*
folder?
Does log/development.log contain the word Error anywhere?

--
  Phlip

--
Best Regards
Cooper Geng

John Joyce wrote:

Thanks a lot. When I disabled this line, the program do work.
But if I would like to reserve this function and not discard this line, what
should I do?

From this point on it is HIGHLY recommended to buy a book. Especially the Agile Web Development With Rails book.
It's all in there. (not necessarily in the order you might expect, but it's in there)
If you're really new to web development, you should go for the Rails book from SitePoint publishing.
It's a perfect newbie book, but you'll still want to have AWDWR.
Also, do not neglect the Ruby on Rails web site. There is lots of info there too.
The Rails Talk group is also helpful, but you'll do better to go there after you've learnt the basics of Rails.
Don't worry, Rails basics are not that tough. A lot of frameworks in other languages are a LOT more convoluted (sometimes just by the language they're written in)
Oh one more. keep a browser window open to the Rails API !!! It's quite good and extremely useful in learning and more.

but you really should try to keep questions for this list to Ruby specific things.
some Rails stuff is Ruby specific, but so far this isn't.

Also look at RailsSpace I have both and RailsSpace does a good job of providing information you would have to dig for in the Agile book.

-r

···

On Sep 16, 2007, at 10:17 PM, coolgeng coolgeng wrote:

on your dev machine, point your web browser to
localhost:0.0.0.3000
You should see the Welcome to Rails page.

You also want to make sure you've properly entered the values in your Yaml file for your system.

But you really should take this to the Rails list or browse more Rails sites. This point in starting out with Rails is very well documented in many books and countless online tutorials.

I can see the Welcome to Rails page through "http://localhost:3000/&quot;\.

···

On 9/14/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:

on your dev machine, point your web browser to
localhost:0.0.0.3000
You should see the Welcome to Rails page.

You also want to make sure you've properly entered the values in your
Yaml file for your system.

But you really should take this to the Rails list or browse more
Rails sites. This point in starting out with Rails is very well
documented in many books and countless online tutorials.

--
Best Regards
Cooper Geng