Re: [Rails] Interesting question

2012-01-07 Thread Colin Law
On 6 January 2012 23:34, gerbdla gerb...@gmail.com wrote: I have an interesting question and I am not sure if it is even possible to accomplish but thought would give you guys a look at it. I have four objects here 2 Teams and 2 AthleteTeams associations what I need to do is test to see if

Re: [Rails] how to make the whenever gem to run a cron job

2012-01-07 Thread Colin Law
On 7 January 2012 04:46, dv dhanadan li...@ruby-forum.com wrote: how to make the whenever gem to run a cron job? I have installed the whenever gem into my rails project successfully,could any one tell me on how i can get this gem run a rake task for me... If you are using cron then you do not

[Rails] Re: How to migrate on another server?

2012-01-07 Thread Nikolay
Server uses Linux Server Can Puppet or Chef grab all rvm + rails + nginx + passenger + unicorn + capistrano on another server? I found http://gitpusshuten.com/ It's simalar step-by-step server inviroment instalation. Are there simalar projects to set rails enviroment instant? -- You received

[Rails] RoR application design for real estate web site

2012-01-07 Thread tankard
I'm trying to implement a real estate app. But i'm stuck at designing models associations. I's my first RoR app. Situation The app has different types of properties/estate(house, apartment, garage, land etc). These properties have some common attributes(name, price, description) and some

[Rails] Re: how to make the whenever gem to run a cron job

2012-01-07 Thread Alex Mercer
Whenever just helps to use cron with simple ruby syntax. To make it run cronjobs. You need to: 1. Exec in your project folder: wheneverize . This will create config/schedule.rb file. 2. There type some action needed to be done with cron: every 3.hours do rake my:rake:task end 3. Save it and

Re: [Rails] Re: how to make the whenever gem to run a cron job

2012-01-07 Thread Colin Law
On 7 January 2012 10:50, Alex Mercer alexey.boby...@gmail.com wrote: Whenever just helps to use cron with simple ruby syntax. If I had looked up whenever before replying then my post might have been more helpful :( Colin -- You received this message because you are subscribed to the Google

[Rails] could not get 3xx (550)

2012-01-07 Thread Dharmdip Rathod
Getting strange error while performing rake task. Automated creating users for testing. It's creating users till number 999, getting error while creating user 1000. Rake Task : desc Generate test users task :generate_test_users = :environment do for i in (1..5000)

[Rails] Re: how to make the whenever gem to run a cron job

2012-01-07 Thread Dharmdip Rathod
whenever --update-crontab -set='environment=development' -- Posted via http://www.ruby-forum.com/. -- 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@googlegroups.com. To unsubscribe

[Rails] mySQL RoR

2012-01-07 Thread muhammad singgih zulfikar ansori
Anyone, I need some help to configure RoR using MySQL and phpmyadmin. I'm stuck here. how to configure it so I can use scaffold to create simple CRUD, i'm still learning on it. Thanks :D -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To

Re: [Rails] could not get 3xx (550)

2012-01-07 Thread Colin Law
On 7 January 2012 12:52, Dharmdip Rathod li...@ruby-forum.com wrote: Getting strange error while performing rake task. Automated creating users for testing. It's creating users till number 999, getting error while creating user 1000. Rake Task : desc Generate test users  task

Re: [Rails] mySQL RoR

2012-01-07 Thread Colin Law
On 7 January 2012 13:04, muhammad singgih zulfikar ansori m.singgih...@gmail.com wrote: Anyone, I need some help to configure RoR using MySQL and phpmyadmin. I'm stuck here. how to configure it so I can use scaffold to create simple CRUD, i'm still learning on it. Have you worked through some

Re: [Rails] RoR application design for real estate web site

2012-01-07 Thread Daniel Negri
You can see some projects at http://www.opensourcerails.com/ with source codes included. My sugestion to you: learn from GitHub, partipate, commit to that projects. -- Daniel Negri e: danielgomesne...@gmail.com danielne...@gmail.com d: +55 61 8494 1441 Skype: danielnegri Follow me on Twitter

Fwd: [Rails] Complex query with multiple joins

2012-01-07 Thread Peter Vandenabeele
On Sat, Jan 7, 2012 at 12:20 AM, Linus Pettersson linus.petters...@gmail.com wrote: Wow! Thank you for all the help Peter! I really appreciate it. No prob, thank you for getting closer to the root cause. I will test that code tomorrow as it's getting quite late here. I did a small test

Re: [Rails] RoR application design for real estate web site

2012-01-07 Thread jason
as suggested by Daniel, search Open Source Rails, and you will find what you are looking for. -- jason Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Saturday, January 7, 2012 at 7:49 AM, Daniel Negri wrote: You can see some projects at http://www.opensourcerails.com/ with

[Rails] failing rspec - has_password? - Ruby On Rails tutorial

2012-01-07 Thread jason
When running a test against my User class, I'm getting failures on each of the tests, but as far as i can tell everything should be correct. Failures== Failures: 1) User has_password? method should exist Failure/Error: @user.should respond_to(:has_password?) expected nil

[Rails] Re: mySQL RoR

2012-01-07 Thread muhammad singgih zulfikar ansori
Oh, I see so there are free if I read it online and phpmyadmin isn't required for RoR. next time I'll ask again :D Thankyou On Saturday, January 7, 2012, Colin Law wrote: On 7 January 2012 13:04, muhammad singgih zulfikar ansori m.singgih...@gmail.com javascript:; wrote: Anyone, I need some

[Rails] render :partial from .js.erb doesn't render on second pass ...

2012-01-07 Thread Erwin
VIEWS contacts/new.html.haml ... .contact_details = render :partial = contacts/details contacts/_details.html.haml .. %b= regions_in_area(@area) # from contacts_helper.rb sending back a string according to @area upon a drop down change , an Ajax request is send to contacts#change_area

[Rails] Re: Zipcode validation

2012-01-07 Thread Matt Jones
On Jan 6, 5:36 am, savitha sreekumar li...@ruby-forum.com wrote: Hi All, How to validate Zip/Postal code enterd is valid based on country selected? Is there any plugin for checking zipcode format for different countries.. Depends on what you want the postcode for. If it's for something

[Rails] Re: How to send a ASCII escape sequence to a Dot Matrix Printer

2012-01-07 Thread Matt Jones
On Jan 5, 10:04 pm, Christian Bautista christianbautista.i...@gmail.com wrote: Help RoR Masters, I need to print a report that has a escape sequence but every time I try The Dot matrix printer also prints the escape sequence. example *escape sequence here* + '!' +*escape sequence here*

Re: [Rails] Re: Heroku and MySQL

2012-01-07 Thread Hassan Schroeder
On Fri, Jan 6, 2012 at 10:23 PM, ghilly mleve...@gmail.com wrote: Ok, I misunderstood - I thought you could keep your mysql gem.  I  migrated to Postgres and made a few controller tweaks and it worked. Just to be clear, for anyone else finding this thread -- you *don't* have to migrate to

[Rails] Re: render :partial from .js.erb doesn't render on second pass ...

2012-01-07 Thread Erwin
[SOLVED] should use .htl() and not .replaceWith() On Jan 7, 4:17 pm, Erwin yves_duf...@mac.com wrote: VIEWS contacts/new.html.haml ... .contact_details    = render :partial = contacts/details contacts/_details.html.haml ..  %b= regions_in_area(@area)   # from contacts_helper.rb  

Re: [Rails] Complex query with multiple joins

2012-01-07 Thread Linus Pettersson
Hi again! I posted a question about this issue on StackOverflow and got an interesting response. To force Rails to join the included table you can use eager_load() instead of includes(). Using eager_load() and removing the group() seems to make my query work perfect. Correct version:

Re: [Rails] Complex query with multiple joins

2012-01-07 Thread Peter Vandenabeele
On Sat, Jan 7, 2012 at 7:07 PM, Linus Pettersson linus.petters...@gmail.com wrote: Hi again! I posted a question about this issue on StackOverflow and got an interesting response. To force Rails to join the included table you can use eager_load() instead of includes(). Using eager_load()

[Rails] Simple code...please help me in debugging

2012-01-07 Thread Libber
Dear all, In my web application, The client has to enter a set of values and I want to write them to a text file. This is what I am doing to achieve that. class SollusController ApplicationController def index end def new @s=Sollu.new end def create @s=Sollu.new

Re: [Rails] Simple code...please help me in debugging

2012-01-07 Thread Hassan Schroeder
On Sat, Jan 7, 2012 at 10:40 AM, Libber amarnath.alap...@gmail.com wrote:     In my web application, The client has to enter a set of values and I want to write them to a text file. This is what I am doing to achieve that.   def create         @s=Sollu.new         @s.save        

[Rails] set a default value with simple_form

2012-01-07 Thread brent brent
hello anyone know how i can set a default integer value with simple_form, i have code like this below in my view but its not working. %= f.input :age, :value = '30' % i would like the input box to have the value of 30 by default thanks for any help. -- Posted via http://www.ruby-forum.com/.

Re: [Rails] set a default value with simple_form

2012-01-07 Thread Bill Walton
Hello Brent, On Sat, Jan 7, 2012 at 1:17 PM, brent brent li...@ruby-forum.com wrote: hello anyone know how i can set a default integer value with simple_form, i have code like this below in my view but its not working. %= f.input :age, :value = '30' % i would like the input box to have the

Re: [Rails] Simple code...please help me in debugging

2012-01-07 Thread Colin Law
On 7 January 2012 19:03, Hassan Schroeder hassan.schroe...@gmail.com wrote: On Sat, Jan 7, 2012 at 10:40 AM, Libber amarnath.alap...@gmail.com wrote:     In my web application, The client has to enter a set of values and I want to write them to a text file. This is what I am doing to achieve

[Rails] migration trouble in the command line

2012-01-07 Thread Francesca Krihely
Happy Saturday Something weird is happening in my command line. After I create a resource and do the migration, there is none of the typical: == CreatePosts: migrating -- create_table(:posts) - 0.0019s == CreatePosts: migrated

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Javier Quarite
On Sat, Jan 7, 2012 at 11:23 PM, Francesca Krihely france...@10gen.comwrote: Happy Saturday Something weird is happening in my command line. After I create a resource and do the migration, there is none of the typical: So I guess you are doing rails g resource Post right? or what

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Francesca Krihely
That was it! Thank you! I did it with the variable user but now I'm looking into my 'app' folder and there's nothing in the user layout, even though I generated the scaffold and the resource Thanks Francesca On Sat, Jan 7, 2012 at 11:27 PM, Javier Quarite jquari...@gmail.com wrote: On Sat,

Re: [Rails] migration trouble in the command line

2012-01-07 Thread Javier Quarite
You have to generate the scaffold because it generates the models/views/controllers I only use rails g resources when I have a many-to-many relation and it only creates the model/controller Glad you solve it =) Javier -- You received this message because you are subscribed to the Google

[Rails] including jQuery library

2012-01-07 Thread Soichi Ishida
Hi. I have started Rails a few days ago. With the help of a book (written in Japanese), I'm working on a tutorial program which simply shows how to include jQuery file. Rails version 3.1.3 According to the book, there must be a directory public/javascript but there isn't after launching a new

Re: [Rails] including jQuery library

2012-01-07 Thread Javier Quarite
On Sun, Jan 8, 2012 at 1:02 AM, Soichi Ishida li...@ruby-forum.com wrote: Hi. I have started Rails a few days ago. With the help of a book (written in Japanese), I'm working on a tutorial program which simply shows how to include jQuery file. Rails version 3.1.3 According to the book,

Re: [Rails] set a default value with simple_form

2012-01-07 Thread Ahmy Yulrizka
%= f.input :name, :input_html = { :value = 'test'} % Ahmy Yulrizka On Sun, Jan 8, 2012 at 2:31 AM, Bill Walton bwalton...@gmail.com wrote: Hello Brent, On Sat, Jan 7, 2012 at 1:17 PM, brent brent li...@ruby-forum.com wrote: hello anyone know how i can set a default integer value with

[Rails] Re: Simple code...please help me in debugging

2012-01-07 Thread Libber
Thanks for the reply guys...I figured out my error. I modified the code accordingly. Now I have a new problem. In the create method, I call a system command to run a python program using the input from the user. The program executes perfectly but once the program executed, the server also

Re: [Rails] Re: Simple code...please help me in debugging

2012-01-07 Thread Ahmy Yulrizka
If im not mistaken , calling kernel#exec will replace current process (server). maybe this will help http://mentalized.net/journal/2010/03/08/5_ways_to_run_commands_from_ruby/ also I agree with hassan you should try to get familiar with rails first to get the feel of it. Ahmy Yulrizka On Sun,

[Rails] Re: Simple code...please help me in debugging

2012-01-07 Thread Libber
@all: Can you please suggest a good rails tutorial on using forms? -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/xP8pcXFjLagJ. To post to

Re: [Rails] Re: Simple code...please help me in debugging

2012-01-07 Thread Ahmy Yulrizka
http://guides.rubyonrails.org/form_helpers.html Ahmy Yulrizka On Sun, Jan 8, 2012 at 1:29 PM, Libber amarnath.alap...@gmail.com wrote: @all: Can you please suggest a good rails tutorial on using forms? -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Equivalent to observe_field in rails 3

2012-01-07 Thread venkata reddy
Hi every one, i need something like populating all the states when a particular country selected. My exact requirement is, in my project management tool, when a project is selected all of its activities should be populated in the next drop down. I think before rails 3 it can be