Re: [Rails] Ajax request

2011-05-10 Thread Frederick Cheung
On 10 May 2011, at 23:48, Mlle wrote: > Hi > > I'm trying to create an Ajax request that displays a list of inventory > items resulting from a search on a keyword. How can I insert the list > of inventory items using a partial or a string of html onto the page > following the ajax request? T

Re: [Rails] Rails 3 Routes

2011-05-10 Thread Frederick Cheung
On 10 May 2011, at 20:50, Banks wrote: > Hi everyone, > > I have a nested resource that is generating the route: /events/id/ > registrations.json > > However, I would like to know if I can do something like this: /events/ > registrations.json > > With that said I have three questions: > 1) I

Re: [Rails] Webrick script/server file does not exist

2011-05-10 Thread Frederick Cheung
On 10 May 2011, at 19:12, Maria wrote: > Hello all, > I worked fairly enough with PHP and MySQL, but am very new to Ruby. > I have Windows machine with Apache and MySQL installed previously. [snip] > But as you can see script directory contains only one file > rails > The rails command lin

[Rails] Re: My web developer has abandoned me with a Rails site. NEED HELP ASAP

2011-05-10 Thread marcomontes
I can help too, marcomon...@gmail.com On 8 mayo, 15:51, grouppicture wrote: > Im looking for immediate help. My web developer had started building > me a site in Rails and has since gone AWOL and now I need to change > info on the site but I have ZERO experience with code of any type. I'm > looki

[Rails] Rails 3 respond_with json question

2011-05-10 Thread mikefuzz
Hello, Having trouble with generating some json. I am trying to render an single active record result to json like this: @data = User.find(1) respond_with(@data, :include => :status) The json result is: { -user: { address: null email: "t...@email.com" first_name: "Test" last_name: "Man"

[Rails] Rails 3 Routes

2011-05-10 Thread Banks
Hi everyone, I have a nested resource that is generating the route: /events/id/ registrations.json However, I would like to know if I can do something like this: /events/ registrations.json With that said I have three questions: 1) If I can do that, would the events id still be passed and give m

[Rails] Webrick script/server file does not exist

2011-05-10 Thread Maria
Hello all, I worked fairly enough with PHP and MySQL, but am very new to Ruby. I have Windows machine with Apache and MySQL installed previously. Both Apache and MySql were stopped while installing Ruby. I tried several ways to install Ruby 1.8.7 and one-step installer. I can use Ruby with netbean

[Rails] [ANN] GothamJS: Speak on Broadway!

2011-05-10 Thread Gray Herter
Want to speak about JavaScript on Broadway (yes, that Broadway)? The call for presentations is still open for the GothamJS conference, a one-day, single tracked JavaScript conference, in NYC. But you have to act now, because it is only open through Weds night. So, if you are a Rubyist who speaks Ja

[Rails] Re: My web developer has abandoned me with a Rails site. NEED HELP ASAP

2011-05-10 Thread ct9a
yeah, what sort of changes are they? If it's not too massive, i'm happy to help :) Mail me if you like. Cheers :) Gordon Yeong On May 9, 6:51 am, grouppicture wrote: > Im looking for immediate help. My web developer had started building > me a site in Rails and has since gone AWOL and now I ne

[Rails] Re: My web developer has abandoned me with a Rails site. NEED HELP ASAP

2011-05-10 Thread Agoofin
Take a look at some of the tutorials around the internet for Ruby and Rails to get an idea of what the framework is first. You say the app has been started, if you have a local copy of the files - back them up and then browse the code. I agree with the other posters as to wanting more information

[Rails] Getting null value when it's assigned

2011-05-10 Thread Tomas R.
I have my articles migration create_table :articles do |t| t.integer :category_id, :null => false etc.. and my form Select a category <%= f.select :category_id, Category.all.collect {|category| [category.name, category.id ]} %> But everytime im sending that info im getting a nil value for categ

[Rails] Autocomplete plugin

2011-05-10 Thread Mlle
Hi Is it possible to use the autocomplete plugin to search using a keyword on more than one field of a model? How can I do that? -- 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@googl

Re: [Rails] Re: each do js problem

2011-05-10 Thread Jeffrey L. Taylor
Quoting Colin Law : > On 10 May 2011 17:56, Neil Bye wrote: > > Frederick Cheung wrote in post #997768: > > > >> Is this repeated for each comment? have multiple things on the page > >> with the same id is a no-no: ids should be unique > >> > >> Fred > > > > > > This is the full code > > > > <% @u

[Rails] Ajax request

2011-05-10 Thread Mlle
Hi I'm trying to create an Ajax request that displays a list of inventory items resulting from a search on a keyword. How can I insert the list of inventory items using a partial or a string of html onto the page following the ajax request? The following doesn't work because I can't use a conten

[Rails] Re: Could not find sqlite3

2011-05-10 Thread Nicholas Bruns
I had this same problem right after install and sudo gem install sqlite3 worked -- 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@googlegrou

Re: [Rails] popen4 gem for windows

2011-05-10 Thread Alex Katebi
It is require 'open4' not open3. You are requiring the wrong gem On Tue, May 10, 2011 at 5:33 AM, News Aanad wrote: > hi, i want to make application that run a process automatically after > server starts completely. > I have explore and find popen4 gem which provides this facility. > I have inst

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
On Tue, May 10, 2011 at 3:25 PM, Colin Law wrote: > On 10 May 2011 17:40, Alex Katebi wrote: > ? ... > > I tried it with the subprocess and it does not hang. > > Do you mean *without*? > Sorry! Yes I meant without. > > Colin > > -- > You received this message because you are subscribed to the G

Re: [Rails] Help with 'new' form code - 'render' vs 'redirect_to'

2011-05-10 Thread Frederick Cheung
On 10 May 2011, at 21:32, Colin Law wrote: > On 10 May 2011 21:23, Rodrigo Ruiz wrote: >> Hi, I'm having some trouble to understand the following code: >> def new >> @user = User.new >> @title = "Sign up" >> end >> >> def create >> @user = User.new(params[:user]) >> if @u

Re: [Rails] Help with 'new' form code - 'render' vs 'redirect_to'

2011-05-10 Thread Walter Davis
On May 10, 2011, at 4:23 PM, Rodrigo Ruiz wrote: Hi, I'm having some trouble to understand the following code: def new @user = User.new @title = "Sign up" end def create @user = User.new(params[:user]) if @user.save flash[:success] = "Welcome to the Sample App!"

Re: [Rails] Help with 'new' form code - 'render' vs 'redirect_to'

2011-05-10 Thread Colin Law
On 10 May 2011 21:23, Rodrigo Ruiz wrote: > Hi, I'm having some trouble to understand the following code: >  def new >     @user = User.new >     @title = "Sign up" >   end > >   def create >     @user = User.new(params[:user]) >     if @user.save >       flash[:success] = "Welcome to the Sample A

[Rails] Help with 'new' form code - 'render' vs 'redirect_to'

2011-05-10 Thread Rodrigo Ruiz
Hi, I'm having some trouble to understand the following code: def new @user = User.new @title = "Sign up" end def create @user = User.new(params[:user]) if @user.save flash[:success] = "Welcome to the Sample App!" redirect_to @user else @title = "Sign up

[Rails] Read Atom Feed with additional schema

2011-05-10 Thread Mohamed Saeed
Hello, I am using Feed-normalizer to parse Atom Feed, but my feed entry contains custom tags which defined in custom schema, but feed-normalizer don't see these tags because it's not standard tags. How to use this custom schema with feed-normalizer or using anything else Thanks Mohamed -- Poste

Re: [Rails] Re: each do js problem

2011-05-10 Thread Colin Law
On 10 May 2011 17:56, Neil Bye wrote: > Frederick Cheung wrote in post #997768: > >> Is this repeated for each comment? have multiple things on the page >> with the same id is a no-no: ids should be unique >> >> Fred > > > This is the full code > > <% @user.comments.each do |comment| %> >   <%= co

Re: [Rails] requests hanging

2011-05-10 Thread Colin Law
On 10 May 2011 17:40, Alex Katebi wrote: ? ... > I tried it with the subprocess and it does not hang. Do you mean *without*? Colin -- 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@go

Re: [Rails] Re: Exercises book

2011-05-10 Thread Rodrigo Ruiz
Thank you for the tip, I'll try that for a while, but I was looking for something more like an actual class, like those opencoursewares from big universities like Stanford and MIT, and also something specifically for rails, with the subject (validations for example) and the related exercises. On T

[Rails] Re: Why is deep_symbolize_keys not available within application.rb (undefined method `deep_symbolize_keys' for Hash)

2011-05-10 Thread David Kahn
On Tue, May 10, 2011 at 12:37 PM, David Kahn wrote: > Ok, so it looks like I need ActiveSupport::CoreExtensions::Hash. A bit > confused as at the top of application.rb there is * require 'rails/all' *, > so I would think this should be included but is not. ActiveSupport is loaded > but not CoreExt

[Rails] Why is deep_symbolize_keys not available within application.rb (undefined method `deep_symbolize_keys' for Hash)

2011-05-10 Thread David Kahn
If there is a better way to do this I am open: I am trying to load a yaml config file which holds application settings (which happens to be shared between the main app and an engine). class Application < Rails::Application config_file = "#{Rails.root}/config/config.yml" if File.exists?(con

[Rails] Re: Why is deep_symbolize_keys not available within application.rb (undefined method `deep_symbolize_keys' for Hash)

2011-05-10 Thread David Kahn
Ok, so it looks like I need ActiveSupport::CoreExtensions::Hash. A bit confused as at the top of application.rb there is * require 'rails/all' *, so I would think this should be included but is not. ActiveSupport is loaded but not CoreExtensions. ActiveSupport::CoreExtensions::Hash::Conversions

Re: [Rails] Re: each do js problem

2011-05-10 Thread Frederick Cheung
On 10 May 2011, at 17:56, Neil Bye wrote: > Frederick Cheung wrote in post #997768: > >> Is this repeated for each comment? have multiple things on the page >> with the same id is a no-no: ids should be unique >> >> Fred > > > This is the full code > > <% @user.comments.each do |comment| %

[Rails] Re: each do js problem

2011-05-10 Thread Neil Bye
Frederick Cheung wrote in post #997768: > Is this repeated for each comment? have multiple things on the page > with the same id is a no-no: ids should be unique > > Fred This is the full code <% @user.comments.each do |comment| %> <%= comment.body %> <%= comment.story_id %> <%= comment

[Rails] Re: each do js problem

2011-05-10 Thread Neil Bye
Eugen Ciur wrote in post #997765: > > http://api.jquery.com/toggle/ > > use it, it will simplify you code and maybe you'll find out solution on > your own. Never used jquery before, I see it's simplicity compared to straight js I now have <% @user.comments.each do |comment| %> <%= comment.bod

[Rails] Re: ERROR: RDoc documentation generator not installed!

2011-05-10 Thread John B.
I just found this old thread searching for the same problem. For me, the actual needed command was 'yum install ruby-rdoc' -- 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

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
On Tue, May 10, 2011 at 12:04 PM, David Kahn wrote: > > > On Tue, May 10, 2011 at 10:43 AM, Alex Katebi wrote: > >> >> >> On Tue, May 10, 2011 at 11:01 AM, David Kahn >> wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:56 AM, David Kahn >>> wrote: >>> On Tue, May 10, 2011 at 9:45 A

Re: [Rails] requests hanging

2011-05-10 Thread David Kahn
On Tue, May 10, 2011 at 10:43 AM, Alex Katebi wrote: > > > On Tue, May 10, 2011 at 11:01 AM, David Kahn > wrote: > >> >> >> On Tue, May 10, 2011 at 9:56 AM, David Kahn >> wrote: >> >>> >>> >>> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi wrote: >>> I have restarted the server but not the c

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
On Tue, May 10, 2011 at 11:01 AM, David Kahn wrote: > > > On Tue, May 10, 2011 at 9:56 AM, David Kahn > wrote: > >> >> >> On Tue, May 10, 2011 at 9:45 AM, Alex Katebi wrote: >> >>> I have restarted the server but not the computer. I am doing something >>> abnormal. Off of a request I start some e

Re: [Rails] requests hanging

2011-05-10 Thread Colin Law
On 10 May 2011 16:40, Alex Katebi wrote: > ... > I meant to say that I started the subprocesses in the previous request. I suggest that you first disable the starting of the sub processes to see whether the issues disappears. Colin -- You received this message because you are subscribed to the

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
On Tue, May 10, 2011 at 10:54 AM, Colin Law wrote: > On 10 May 2011 15:45, Alex Katebi wrote: > > Please don't top post, it makes it difficult to follow the thread. > Sure! > Insert your replies at appropriate points in previous message. Thanks > > > I have restarted the server but not the com

Re: [Rails] requests hanging

2011-05-10 Thread David Kahn
On Tue, May 10, 2011 at 9:45 AM, Alex Katebi wrote: > I have restarted the server but not the computer. I am doing something > abnormal. Off of a request I start some external program as sub processes. > It takes about one second to start those sub processes. Maybe you could post your code. One

Re: [Rails] requests hanging

2011-05-10 Thread David Kahn
On Tue, May 10, 2011 at 9:56 AM, David Kahn wrote: > > > On Tue, May 10, 2011 at 9:45 AM, Alex Katebi wrote: > >> I have restarted the server but not the computer. I am doing something >> abnormal. Off of a request I start some external program as sub processes. >> It takes about one second to sta

Re: [Rails] requests hanging

2011-05-10 Thread Colin Law
On 10 May 2011 15:45, Alex Katebi wrote: Please don't top post, it makes it difficult to follow the thread. Insert your replies at appropriate points in previous message. Thanks > I have restarted the server but not the computer. I am doing something > abnormal. Off of a request I start some ex

[Rails] Controller best practices

2011-05-10 Thread richard s.
I'm frequently building controllers where i would like multiple methods (in addition to index, edit, show, etc.). Most of the time the actions i desire could be lumped into show as they are simple GET operations, however I don't want to put too much logic in any one controller action. Here is a qu

Re: [Rails] 3.1 - CoffeeScript in view templates

2011-05-10 Thread Conrad Taylor
On Mon, May 9, 2011 at 8:53 AM, Curtis Schiewek wrote: > With rjs we did this: > # app/views/products/update.rjs > page.replace_html "products", render(@products) > > With jquery and ujs we do this: > # app/views/products/update.js.erb > $("products").update("<%= escape_javascript(render(@products

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
I have restarted the server but not the computer. I am doing something abnormal. Off of a request I start some external program as sub processes. It takes about one second to start those sub processes. How long are we allowed to delay the sending of a respond? Is there a better way do this in Rails

Re: [Rails] requests hanging

2011-05-10 Thread David Kahn
On Tue, May 10, 2011 at 9:25 AM, Alex Katebi wrote: > > I see nothing any where. > To clarify, on your server terminal window, you see no output when you try to access a page? And of course the page does not load, I assume. It is probably not this if you are seeing nothing at all on the terminal

Re: [Rails] requests hanging

2011-05-10 Thread Alex Katebi
I see nothing any where. On Mon, May 9, 2011 at 4:58 PM, Colin Law wrote: > On 9 May 2011 21:54, Alex Katebi wrote: > > If my Rails server has been sitting idle for a while, it does not respond > to > > new requests. > > What is the best way to troubleshoot something like that. > > I am using R

[Rails] Re: Upload video to YouTube from rails app

2011-05-10 Thread Eugen Ciur
Mechanize is a great gem to write 'automate like' tasks like yours. Maybe this link can help http://tenderlovemaking.com/2008/02/26/automated-youtube-uploads/ http://blog.eugen.co -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goo

[Rails] Re: each do js problem

2011-05-10 Thread Eugen Ciur
>"The subcomments on the first comments subcomments" > >"the subcomments on the first comment and has no effect on it's own >subcomments" > lol :) In jquery there is nice method toggle. .toggle( showOrHide ) showOrHideA Boolean indicating whether to show or hide the elements. With no paramet

[Rails] Upload video to YouTube from rails app

2011-05-10 Thread Oleg Makarov
Hello. I have some question, how can upload video to youtube from rails app? After searching I find rails plugin *youtube-model*( https://github.com/edgarjs/youtube-model), but he have a very bad examples: weired code blocks, deprecated methods. Anybody use this plugin? or another for this quest

[Rails] Re: Exercises book

2011-05-10 Thread Eugen Ciur
You can find a lot of exercises here http://www.rubyquiz.com/ Usually you find problem explanation there, then in plain ruby, people submit their solutions. This is an absolutely great source to learn ruby language without rails. On amazon there is a book 'best of ruby quiz', extracted from sit

[Rails] Re: Fixing the URL

2011-05-10 Thread Frederick Cheung
On May 10, 11:46 am, Tiago Veloso wrote: > On May 10, 2011, at 11:27 , Colin Law wrote: > > > On 10 May 2011 10:56, Tiago Veloso wrote: > >> Hi, > > >> I have a very basic search form whose method is get. > > >> When I use it I get the following in my url > > >> search?utf8=✓&search=a > > >> I'

Re: [Rails] Re: Routes - Search url parser

2011-05-10 Thread Colin Law
On 10 May 2011 11:32, danimashu wrote: > Thanks for the answer. > >> But then what happens with: >> >>  - example.com/pink/cadillac  ? > > In the controller would have to check that pink is a Color and > cadillac is a Brand. Problem if some day there is a Brand with name of > Color. I don't know i

Re: [Rails] Fixing the URL

2011-05-10 Thread Tiago Veloso
On May 10, 2011, at 11:27 , Colin Law wrote: > On 10 May 2011 10:56, Tiago Veloso wrote: >> Hi, >> >> I have a very basic search form whose method is get. >> >> When I use it I get the following in my url >> >> search?utf8=✓&search=a >> >> I'd just like to remove the utf8 part. How could I do

[Rails] Re: Does ARMailer work in Rails 2.3!

2011-05-10 Thread Anu Sebastian
Tom Ha wrote in post #800549: > Here's the solution for those of you who will encounter the same issue > ("the class reloading issue"): > > Drop the file attached (ar_mailer_patch.rb) into you initializers > folder. > > The file uses the explicit Email class name instead of the class > variable, to

Re: [Rails] Fixing the URL

2011-05-10 Thread Colin Law
On 10 May 2011 10:56, Tiago Veloso wrote: > Hi, > > I have a very basic search form whose method is get. > > When I use it I get the following in my url > > search?utf8=✓&search=a > > I'd just like to remove the utf8 part. How could I do it? Just for interest why do you want to do this? Colin -

[Rails] Re: Routes - Search url parser

2011-05-10 Thread danimashu
Thanks for the answer. > But then what happens with: > >  - example.com/pink/cadillac  ? In the controller would have to check that pink is a Color and cadillac is a Brand. Problem if some day there is a Brand with name of Color. I don't know if it's worth wasting time on it. The classic way soul

[Rails] Fixing the URL

2011-05-10 Thread Tiago Veloso
Hi, I have a very basic search form whose method is get. When I use it I get the following in my url search?utf8=✓&search=a I'd just like to remove the utf8 part. How could I do it? Tiago Veloso ti.vel...@gmail.com -- You received this message because you are subscribed to the Google Group

[Rails] popen4 gem for windows

2011-05-10 Thread News Aanad
hi, i want to make application that run a process automatically after server starts completely. I have explore and find popen4 gem which provides this facility. I have installed a gem but there is some problem while executing the ruby program. The error is like * :29:in `require': no such file to