Re: [Rails] What Is Wrong With Code - I am beginner- Time Limit Exceed Problem

2011-08-14 Thread John Winters
On 14/08/11 05:56, Rahul wrote: # To change this template, choose Tools | Templates # and open the template in the editor. puts "Hello World" def squareroot(a) u=a l=0 while (l<=u) m = l + (u-1)/2 puts "u = #{u}, l = #{l}, m = #{m}" if (m**2) < a [snip rest of cod

Re: [Rails] Re: Install Ruby 1.9.2 and rails

2011-08-11 Thread John Winters
On 11/08/11 14:34, Bruno Meira wrote: yeah, I already type "rvm | head -1", and everything works good. I installed ruby using rvm. "rvm install 1.9.2". It works well but when I type "ruby -v" in console, if I'm on sudo mode it shows me a message telling me that this command does not find. Otherw

Re: [Rails] Re: Install Ruby 1.9.2 and rails

2011-08-11 Thread John Winters
On 11/08/11 12:52, Bruno Meira wrote: I already tried it. But the "ruby -v" only works in non-root mode and "rails -v" doesn't work in any mode ;/ You'll have to give a bit more information than that if you want any useful help. Do you have rvm installed and working? Does your installation

Re: [Rails] Install Ruby 1.9.2 and rails

2011-08-11 Thread John Winters
On 11/08/11 12:09, Bruno Meira wrote: I tried everything to install this version of ruby and rails 3 in my s.o. All the the tutorials that I found don't work. Sb know how to install this version of RoR in my S.O. I'm using Debian. I strongly suggest you use rvm. See http://beginrescueend.com/

Re: [Rails] Devise AssociationTypeMismatch

2011-08-09 Thread John Winters
Try passing \"role_id\":\"2\". I started seeing this in my tests as soon as I updated to 3.1rc5. It didn't happen with 3.1rc4. HTH John On 9 August 2011 18:09, Pete wrote: > My site is using Devise and Cancan. Currently I have 3 roles setup > I am testing creating a new user using the follow