how to use rails debug ?

12 views
Skip to first unread message

Fahim Patel

unread,
Oct 10, 2012, 1:57:56 AM10/10/12
to rubyonra...@googlegroups.com
I wish to  debugging  my app.I install gem and start my console by using --debug option . 
But i don't know how to use it.
 
Give me some helpful starting for core .
I search and get some good pages, but when i fire commands  ,not  working.

How trace methods ?
How to trace variable  ?

Thanks 

Regards
Fahim Babar Patel 
  

KUL KING

unread,
Oct 10, 2012, 2:00:00 AM10/10/12
to rubyonra...@googlegroups.com
You should use "pry" gem. It is much easier.

  

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/h0W0UgDOceEJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Fahim Patel

unread,
Oct 10, 2012, 2:09:14 AM10/10/12
to rubyonra...@googlegroups.com
asw

 1.Is pry is best for debugging in your experience .

 2 .Can it work same as we work on console ? or we have to learn some new command ?

3. Can we debug our controller and model methods line by line  ?


I know i have lots of questions ?
Just give me one line answer which i can understood.

jajakallah

KUL KING

unread,
Oct 10, 2012, 2:16:59 AM10/10/12
to rubyonra...@googlegroups.com
The answer of first and third question is yes.
It also works on console. No new tool or commands needed to be learned.

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/UMuSvA6v_A0J.

Fahim Patel

unread,
Oct 10, 2012, 2:45:34 AM10/10/12
to rubyonra...@googlegroups.com
i have one more problem can u solve this...
This question is related to cucumber and capybara.

I am handling three form in one page . It means i am handling three model. this three are connected to each other using association.
I am using nested form concept.

In development stage working perfectly.
When i write feature file to test , i dont know how to fill my inner forms text field.

I will explain u .
Assume three model a,b,c.

a[b][c][0][attibutes]  # name generated by rail is this

 when i write this step in file
  fill_in   "a[b][c][0][attibutes]" , :with=>testing
i get error
 cannot fill in, no text field, text area or password field with id, name, or label  a[b][c][0][attibutes]

Hope u all understood  problem


On Wednesday, October 10, 2012 11:27:56 AM UTC+5:30, Fahim Patel wrote:

KUL KING

unread,
Oct 10, 2012, 2:47:38 AM10/10/12
to rubyonra...@googlegroups.com
I am not able to help you in integration testing as I have never done it. Anybody please help him.

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/nDuPR2YVnwIJ.
Reply all
Reply to author
Forward
0 new messages