[Rails] Re: How do you scale horizontally with Rails 3.2 on EC2?

2012-05-03 Thread Claudio Poli
Hello Fred, gaining advantage of EBS indeed is the ideal solution. Cheers -- 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.

[Rails] Could not find a JavaScript runtime -- Bundler & Rbenv

2012-05-03 Thread Ari King
I'm trying to deploy my app using Capistrano, Bundler, and Rbenv. When I execute "cap deploy:update" I get get the following error when trying to precompile: "Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes." failed: "env PATH=$HOME/

Re: [Rails] tips on improving rendering performance?

2012-05-03 Thread Guilherme Dutra
Here have some tips, it's in portuguese but is understandable; http://www.slideshare.net/akitaonrails/caelum-dicas-web-2010 2012/5/3 Jeff Pritchard > I have a complicated rails screen with terrible performance. > > I've been trying to narrow it down and figure out what is soaking up all > the ti

[Rails] tips on improving rendering performance?

2012-05-03 Thread Jeff Pritchard
I have a complicated rails screen with terrible performance. I've been trying to narrow it down and figure out what is soaking up all the time, but there doesn't seem to be any one major suspect...lots of important stuff all taking up time. The standard Rails logging shows that most of it is rend

[Rails] Handing request.session in Rack Middleware ...

2012-05-03 Thread Kedar Mhaswade
I have been experimenting with providing API for my own Rails 3 app and I implemented the OAuth-provider. With OAuth-provider, access_token is the king. Now, my idea is my users will invoke the API like: GET requests (e.g. for listing the instances of a "Comment" resource) -- curl 'http://127

[Rails] How to create three objects/records using one form? And how to show validation errors for them?

2012-05-03 Thread regedarek
I want to create a form which sends email to each recipient and then create new record in free_registration_coupons table. I need validation of email for this form. [image: enter image description here] Model *FreeRegistrationCoupon*: recipient_email, token, sender_id For now i have this: c

[Rails] Re: Why I have to set two unnecessary params in controller action after i send form_tag?

2012-05-03 Thread regedarek
Thanks this was it. Solved. W dniu czwartek, 3 maja 2012 16:16:10 UTC+2 użytkownik regedarek napisał: > > https://gist.github.com/2585733 > > This is my code. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on th

Re: [Rails] inheritance with rails.

2012-05-03 Thread Jeremy Walker
On 3 May 2012 15:49, Mauro wrote: > On 3 May 2012 16:41, Jeremy Walker wrote: > > > > > > On 3 May 2012 15:28, Mauro wrote: > >> > >> Hello. > >> I've read about examples on inheritance with rails. > >> Here is an example: > >> > >> > >> > http://juixe.com/techknow/index.php/2006/06/03/rails-si

Re: [Rails] inheritance with rails.

2012-05-03 Thread Mauro
On 3 May 2012 16:41, Jeremy Walker wrote: > > > On 3 May 2012 15:28, Mauro wrote: >> >> Hello. >> I've read about examples on inheritance with rails. >> Here is an example: >> >> >> http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/ >> >> The way is to add a type field

Re: [Rails] inheritance with rails.

2012-05-03 Thread Jeremy Walker
On 3 May 2012 15:28, Mauro wrote: > Hello. > I've read about examples on inheritance with rails. > Here is an example: > > > http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/ > > The way is to add a type field in the table. > So if I have an Animal class with an attri

[Rails] inheritance with rails.

2012-05-03 Thread Mauro
Hello. I've read about examples on inheritance with rails. Here is an example: http://juixe.com/techknow/index.php/2006/06/03/rails-single-table-inheritance/ The way is to add a type field in the table. So if I have an Animal class with an attribute name, I can inherit from this class like: Dog

Re: [Rails] Why I have to set two unnecessary params in controller action after i send form_tag?

2012-05-03 Thread Aziz Bookwala
You are using "send" for an action name. Send is used internally by ruby. I'd suggest renaming the action. On Thu, May 3, 2012 at 7:46 PM, regedarek wrote: > https://gist.github.com/2585733 > > This is my code. > > -- > You received this message because you are subscribed to the Google Groups >

Re: [Rails] Why I have to set two unnecessary params in controller action after i send form_tag?

2012-05-03 Thread Michael Pavling
On 3 May 2012 15:16, regedarek wrote: > https://gist.github.com/2585733 > > This is my code. "send" is an critically important method in Ruby - probably best to name your action something else. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" g

[Rails] Why I have to set two unnecessary params in controller action after i send form_tag?

2012-05-03 Thread regedarek
https://gist.github.com/2585733 This is my code. -- 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 from this group, send email to rubyonrails-talk+unsu

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Jeremy Walker
On 3 May 2012 14:38, akshar jamgaonkar wrote: > HEy cool.. Thanks a lot...it worked however with state drop down i also > iam getting a lot of other un necessary html.. The html is what i have > written in application.html.erb for templating purpose... Is this the > wrong way to write st

[Rails] Re: ActiveRecord has_many :finder_sql

2012-05-03 Thread Matt Jones
On Wednesday, 2 May 2012 10:58:49 UTC-4, Ruby-Forum.com User wrote: > > I'm in trouble with an pl/sql query. My user ActiveRecord::Base class > has a specific query. When I call this query, I've an error "TypeError > no _dump_data is defined for class Proc". > > There is the ActiveRecord::Base

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
HEy cool.. Thanks a lot...it worked however with state drop down i also iam getting a lot of other un necessary html.. The html is what i have written in application.html.erb for templating purpose... Is this the wrong way to write static html code in application.html.erb... Thanks a lot..

[Rails] Re: Hosting application on private network.

2012-05-03 Thread Jim
> I am able to run this app in my system using the url > "http://blogapp.mytvsxbass.com/users/login";. But I would like to open > this application on another machine with url > "http://192.168.3.57/users/login";. The error I am getting in the browser > is: >  Not Found > The requested URL /users/lo

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Jeremy Walker
On 3 May 2012, at 14:24, akshar jamgaonkar wrote: > Yes i have a Select box with this id = "client_state_id" .. when i run > $("#client_state_id") the select drop down control gets highlighted. Thanks Try using replaceWith() instead of html() in your success function. > > On Thu, May 3,

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Yes i have a Select box with this id = "client_state_id" .. when i run $("#client_state_id") the select drop down control gets highlighted. Thanks On Thu, May 3, 2012 at 6:46 PM, Jeremy Walker wrote: > > > On 3 May 2012, at 14:06, AJ wrote: > > > Hello All, > > > > ill just summarize everythi

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Jeremy Walker
On 3 May 2012, at 14:06, AJ wrote: > Hello All, > > ill just summarize everything in this message..kindly suggest as to > what might be wrong Do you have a div with the id of "client_state_id"? What do you get if you run $("#client_state_id") in firebug? Jeremy Walker > > > -

[Rails] Re: Country State City using AJAX

2012-05-03 Thread AJ
Hello All, ill just summarize everything in this message..kindly suggest as to what might be wrong

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Hi all, I have succesfully got a responce like this as to what i want , this is the ouptut in my fireofx console. Maharashtra. but the html on the page is not updating...any reson why this could be ...thanks a lot On Thu, May 3, 2012 at 5:58 PM, akshar jamgaonkar < akshar.jamgaon...@

Re: [Rails] haml and w3c validator

2012-05-03 Thread Jeremy Walker
On 3 May 2012 13:35, angel david wrote: > Hi All, > > > I have a doubt regarding haml and w3c validator. Is w3c validator > compatible for code written in haml? > > Because I have done a project full in haml and its the need that there > is no errors in w3c. But I have some errors which i think m

[Rails] haml and w3c validator

2012-05-03 Thread angel david
Hi All, I have a doubt regarding haml and w3c validator. Is w3c validator compatible for code written in haml? Because I have done a project full in haml and its the need that there is no errors in w3c. But I have some errors which i think may be because of haml.. I have posted some of the err

Re: [Rails] Re: Re: Hosting application on private network.

2012-05-03 Thread Michael Pavling
On 3 May 2012 13:10, Ajit Teli wrote: > Fy final idea is to host the application worldwide. All the http > requests to public ip (122.166.7.181) with port 8050 should be directed > to my system and users should be able to browse the app. I have > configured the router for port-forwarding. But it i

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Also in the def countries_state @state = State.where("country_id = :c_id",{:c_id => params[:country_id]}) respond_to do |format| format.html end end previously the it was format.js when nothing on the page was changing dynamically but when i make it format.html, the state drop down changes but

Re: [Rails] Can't push to Heroku

2012-05-03 Thread Yaw Boakye elGran
Thanks. It did :) -- 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 from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For mo

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Hi Aziz Iam getting whatevr reponce iam nneding,... Thansk a lot.in the console in firbug when i see i get the states for a specific counytry.The responce is like "[["Goa", 2]]" however whatever processing i do in application.js in not taking effect,, My application.j

[Rails] Re: Re: Hosting application on private network.

2012-05-03 Thread Ajit Teli
Aziz Bookwala wrote in post #1059415: > I dont have too much experience with Apache, but I think this happens > because Apache will serve the application on the > blogapp.mytvsxbass.comdomain. If this is the case, you could add a > mapping for the domain and ip > in your /etc/hosts and it should wo

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
Not a problem. On Thu, May 3, 2012 at 5:32 PM, akshar jamgaonkar < akshar.jamgaon...@gmail.com> wrote: > Thanks Aziz thanks a lot...really appriaciate your help > > > On Thu, May 3, 2012 at 5:31 PM, Aziz Bookwala wrote: > >> That is fine, though you could make it more 'RESTful' by adding it a

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Thanks Aziz thanks a lot...really appriaciate your help On Thu, May 3, 2012 at 5:31 PM, Aziz Bookwala wrote: > That is fine, though you could make it more 'RESTful' by adding it as a > nested resource. You can read about that > here. > The

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
That is fine, though you could make it more 'RESTful' by adding it as a nested resource. You can read about that here. The RailsCast is a little old, but you should get the idea. With respect to your current problem, what is the url you are usin

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Iam sorry i didnt get you.. i have created a new action for the ajax stuff is this approach wrong. This is how my states controller is --

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Yea it looks like this... match "/states/countries_state/:country_id" => "states#countries_state" resources :clients resources :skill_sets resources :technologies resources :level_of_contacts resources :states resources :discounts resources :countries resources :roles g

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
Make sure this route comes before the route entry for the country resource. On Thu, May 3, 2012 at 5:12 PM, akshar jamgaonkar < akshar.jamgaon...@gmail.com> wrote: > Yes i have addedit looks like this > > match "/states/countries_state/:country_id" => "states#countries_state" > > > On Thu, Ma

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Yes i have addedit looks like this match "/states/countries_state/:country_id" => "states#countries_state" On Thu, May 3, 2012 at 5:10 PM, Aziz Bookwala wrote: > Did you add a route for this new action? > > > On Thu, May 3, 2012 at 5:08 PM, akshar jamgaonkar < > akshar.jamgaon...@gmail.com>

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
my country_state action looks like this def countries_state @state = State.find("country_id = :c_id",{:c_id=>params[:country_id]}) respond_to do |format| format.js end end On Thu, May 3, 2012 at 5:08 PM, akshar jamgaonkar < akshar.jamgaon...@gmail.com> wrote: > Thanks Aziz... I have wri

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
Did you add a route for this new action? On Thu, May 3, 2012 at 5:08 PM, akshar jamgaonkar < akshar.jamgaon...@gmail.com> wrote: > Thanks Aziz... I have wriiten a countries_state action and in states > controller, and in application.js i have modified the path like this > var country_states_p

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Thanks Aziz... I have wriiten a countries_state action and in states controller, and in application.js i have modified the path like this var country_states_path = '/states/countries_state/'; however on console its giving me eroor like Couldn't find State with id=countries_state ... Iam strugg

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
Hey AJ Yes, to serve any request made by your client, you would need something on the server to handle the request. As for rendering the dropdown, this is a pretty simple thing to do with jQuery. Look around, you should find something quite easily. On Thu, May 3, 2012 at 5:01 PM, akshar jamgaonka

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread akshar jamgaonkar
Hey Aziz, really thanks for you repl..so do i need to write a controller action that would return me the states depending on the country and how do i render the state drop down in Cilent Form...Thanks Thanks, AJ On Thu, May 3, 2012 at 4:46 PM, Aziz Bookwala wrote: > Hey AJ >

Re: [Rails] Re: Hosting application on private network.

2012-05-03 Thread Aziz Bookwala
I dont have too much experience with Apache, but I think this happens because Apache will serve the application on the blogapp.mytvsxbass.comdomain. If this is the case, you could add a mapping for the domain and ip in your /etc/hosts and it should work. You could also tell apache to serve on the i

[Rails] Re: Hosting application on private network.

2012-05-03 Thread Ajit Teli
Aziz Bookwala wrote in post #1059404: > Hey Ajit > > This seems like a simple enough thing to do. Have you looked around at > what > you need to do? Are there any specific problems you are facing? > > On Thu, May 3, 2012 at 2:45 PM, Ajit Teli wrote: > >> Ajit >> For more options, visit this group

Re: [Rails] Re: Country State City using AJAX

2012-05-03 Thread Aziz Bookwala
Hey AJ In your ajax call, you need to pass the id of the selected state if you are using a nested resource url structure. Your js would looks something like this: $(document).ready(function() { var country_states_path = '/countries/:id/states; $("#client_country_id").change(function() {

Re: [Rails] nginx problem "We're sorry, but something went wrong."

2012-05-03 Thread Vincent Lin
Started GET "/posts" for 192.168.1.5 at Thu May 03 17:59:14 +0800 2012 Processing by PostsController#index as HTML Rendered posts/index.html.erb within layouts/application (0.3ms) Completed 500 Internal Server Error in 2ms ActionView::Template::Error (application.css isn't precompiled): 2:

Re: [Rails] Can't push to Heroku

2012-05-03 Thread Jeremy Walker
On 3 May 2012 11:55, 5T41N5 wrote: > I wanna push my application straight from Github to Heroku. Everything > goes through until it hits the installation of the gems. It can't > install the SQLite3 (local DB). > I know Heroku doesn't use SQLite but I didn't expect this problem. > > The error mess

Re: [Rails] nginx problem "We're sorry, but something went wrong."

2012-05-03 Thread Aziz Bookwala
Hey Vincent Your logs would contain a stack trace of what exactly the error was. Could you send that? On Thu, May 3, 2012 at 2:24 PM, Vincent Lin < vincent.open.source.tai...@gmail.com> wrote: > I try to create a production server and follow the instructions in this > document https://github.com

[Rails] Can't push to Heroku

2012-05-03 Thread 5T41N5
I wanna push my application straight from Github to Heroku. Everything goes through until it hits the installation of the gems. It can't install the SQLite3 (local DB). I know Heroku doesn't use SQLite but I didn't expect this problem. The error messages recommended installing a version of SQLite3

Re: [Rails] Hosting application on private network.

2012-05-03 Thread Aziz Bookwala
Hey Ajit This seems like a simple enough thing to do. Have you looked around at what you need to do? Are there any specific problems you are facing? On Thu, May 3, 2012 at 2:45 PM, Ajit Teli wrote: > Hi, > > I have a Ruby on Rails application. I am able to run it in my local > system using Apa

[Rails] Hosting application on private network.

2012-05-03 Thread Ajit Teli
Hi, I have a Ruby on Rails application. I am able to run it in my local system using Apache2 server. I would like to host my application so that all the systems in the private network 192.168.3.0/24 should be able to access the web-application. My system private-ip is 192.168.3.57. Please help

[Rails] nginx problem "We're sorry, but something went wrong."

2012-05-03 Thread Vincent Lin
I try to create a production server and follow the instructions in this document https://github.com/jnstq/rails-nginx-passenger-ubuntu However, my Rails Application can not work properly, and I get a error message, "We're sorry, but something went wrong.".

[Rails] Re: Country State City using AJAX

2012-05-03 Thread AJ
Hi Hassan, I am Bit of a novoice to this.. iam nt sure wether this is correct approach...in my application.js file i have wriiten $(document).ready(function() { $("#client_country_id").change(function() { $.ajax({ type: "GET", url: '/states/1', success: function(data) { // Code }