[Rails] Jruby or Ruby(1.9.1) with Rails for lots of Java Backends

2010-07-19 Thread YoonSung Hong
Hello, I'm working on a project that requires a lot of web triggered java applications. For instance, when a user click a search button, I call java from Rails to do the heavy weight. Is it troublesome to call java application from ruby(on rails)? Can Jruby simplify calling java application and, f

[Rails] Re: many to many relations

2010-07-19 Thread marlow79
Try class author has_one birth :through city has_one death :through city class city belongs_to death belongs_to birth class birth has_one city class death has_one city -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gro

[Rails] Re: Association count sorting

2010-07-19 Thread badnaam
Here is the answer if someone else runs into this.. GrandPa.all do |gpa| p gpa.name gpa.pas.all(:joins => :kids, :select => "pas.*, count(pas.id) AS kid_count" :group => :id, :order => "kid_count DESC").each do |pa| p "#{pa.name} : #{pa.kid_count}" end end On Jul 19, 7:58 pm, Angel

Re: [Rails] Re: Association count sorting

2010-07-19 Thread Angel Robert Marquez
> > Thanks. > > Grandpa has one to many kids and has one pa > No, Grandpa has_many pas > How is this possible? That's like saying I have two left arms. > > I didnt quite get how you proposed listing the pas (and kid count for > each pa) that belong to a certain grandpa > Because the sort is to eas

[Rails] Re: Association count sorting

2010-07-19 Thread badnaam
Thanks. > Grandpa has one to many kids and has one pa No, Grandpa has_many pas I didnt quite get how you proposed listing the pas (and kid count for each pa) that belong to a certain grandpa On Jul 19, 7:42 pm, Angel Robert Marquez wrote: > Kid has one pa and has one grandpa through pa > Pa has

Re: [Rails] Association count sorting

2010-07-19 Thread Angel Robert Marquez
Kid has one pa and has one grandpa through pa Pa has one to many kids and has one grandpa Grandpa has one to many kids and has one pa <%= :name[gp] ?pa = kid if from gp? I think you should just have one model with a foreign key to parent and quantity of child including nil. On Mon, Jul 19, 201

[Rails] Association count sorting

2010-07-19 Thread badnaam
I have 3 models GrandPa, Pa, Kid GrandPa => has_many :pas Pa => has_many kids When I list GrandPa I would like to present the following * 1 - GrandPa_Name 2 - List of Pas sorted by the number kids each pa has in descending order **

[Rails] sudo rake gems:install

2010-07-19 Thread Abder-Rahman Ali
I have upgraded to Rails3beta4 from Rails 2.3.8. I used to run the following command for ensuring that gems are installed: >> sudo rake gems:install But, now, I get the following when running this command on the Rails3beta4 environment: rake aborted! Don't know how to build task 'gems:install'

Re: [Rails] ActiveRecord override

2010-07-19 Thread David Kahn
Thanks Frederick I see what you are saying. So I learned something new, and it turns out the actual issue was that I forgot to run the migration where I munged cleartext in to encrypted. On Mon, Jul 19, 2010 at 5:06 PM, DK wrote: > Ps rails 2.3.5 ruby 1.8.7 > > On 7/19/10, David Kahn wrote:

[Rails] Rails 3 render partial

2010-07-19 Thread Bharat Ruparel
The following rails 2.3.x code is not working in rails 3 beta 4: def render_crud_table(obj,controller_name,columns,search_fields_array,status_array,actions) render :partial => 'shared/crud_maint_table', :object => obj, :locals => {:controller_name => controller_name, :columns => columns

[Rails] named_scope returns Array -- find returns error?

2010-07-19 Thread Seth Willits
>From the documentation: -- class Shirt < ActiveRecord::Base named_scope :red, :conditions => {:color => 'red'} end Unlike Shirt.find(...), however, the object returned by Shirt.red is not an Array; it resembles the association object constructed by a has_many dec

[Rails] Re: Strange Error undefined method `show' for # see no

2010-07-19 Thread rubybox
NoMethodError in Home#index Showing app/views/home/index.html.haml where line # raised: undefined method `show' for # Extracted source (around line #): RAILS_ROOT: /Users/local/Desktop/myapps/apache2/rubydocs/portal Application Trace | Framework Trace | Full Trace /Users/local/Desktop/myapps/ap

[Rails] Re: How to update user model attributes and bypass a presence_of validation?

2010-07-19 Thread pepe
Validations usually have an :if/:unless option. That might be helpful. You could, for example, condition the password and e-mail values to validate only if the name is present. On Jul 19, 2:33 pm, Andrew Perkins wrote: > Hello, I have a user model which stores a users name, email, and password. >

[Rails] Re: Strange Error undefined method `show' for # see no

2010-07-19 Thread rubybox
thanks for the comments so far, I only did a git commit on every deploy I now will do it after each few changes.. Removed some stuff from the app I added before the error occured still same error This is my full trace/error report NoMethodError in Home#index Showing app/views/home/index.html.haml

[Rails] Re: many to many relations

2010-07-19 Thread Marnen Laibow-Koser
Frederick Cheung wrote: > On Jul 19, 9:59�pm, Solidify wrote: >> Hi everyone, I have a simple question: >> >> an author has a place of birth and a place of death. Both places >> should come from the same table (cities). This should be a >> many_to_many relationship, because one author may be born

[Rails] Re: many to many relations

2010-07-19 Thread Marnen Laibow-Koser
Solidify wrote: > Hi everyone, I have a simple question: > > an author has a place of birth and a place of death. Both places > should come from the same table (cities). This should be a > many_to_many relationship, because one author may be born in the same > city where the other author dies. Th

Re: [Rails] Re: many to many relations

2010-07-19 Thread Jesse
Why don't you just make both fields plain text attributes of the author object? On 7/19/10 5:53 PM, Frederick Cheung wrote: On Jul 19, 9:59 pm, Solidify wrote: Hi everyone, I have a simple question: an author has a place of birth and a place of death. Both places should come from the same

[Rails] Re: many to many relations

2010-07-19 Thread Frederick Cheung
On Jul 19, 9:59 pm, Solidify wrote: > Hi everyone, I have a simple question: > > an author has a place of birth and a place of death. Both places > should come from the same table (cities). This should be a > many_to_many relationship, because one author may be born in the same > city where the

[Rails] many to many relations

2010-07-19 Thread Solidify
Hi everyone, I have a simple question: an author has a place of birth and a place of death. Both places should come from the same table (cities). This should be a many_to_many relationship, because one author may be born in the same city where the other author dies. Now in the authors-table, one

[Rails] Re: Re: Strange Error undefined method `show' for # see no

2010-07-19 Thread Marnen Laibow-Koser
Colin Law wrote: [...] > I know it doesn't help, but I think it is worth pointing out for the > future the desirability of using a source control system such as git. Hell yeah. To the OP: you've just discovered why tests and version control are both indispensable. Do no more development without

[Rails] Re: add a member to a pre-existing resource-route?

2010-07-19 Thread Marnen Laibow-Koser
Jonathan Rochkind wrote: > Marnen Laibow-Koser wrote: >> Jonathan Rochkind wrote: >>> Rails2. If a route has already been established with "map.resources", >>> is there any way I can add an additional member to it, without >>> over-writing what's already there? >> >> Just define the route as you

[Rails] Re: noob question : action controller exception

2010-07-19 Thread Marat Kamenschikov
Remove '.' at the end of the error message radu puspana wrote: > hey, > > found the problem. > > is this line: validates_length_of :email, :within => 2..128, :message > => "is not in the range of 2..128 characters." > > when i try to submit email with the value 4, an error like in my first > p

[Rails] Re: all custom helper modules being made available to all controllers without a call to helper?

2010-07-19 Thread frankjmat...@gmail.com
My apologies, I should have mentioned my environment in my first post: Rails 3 tracking git Ruby 1.9.2-rc1 On Jul 19, 5:30 pm, "frankjmat...@gmail.com" wrote: > I have three different helper modules in my helpers directory > (authentication_helper.rb... etc). In my views and partials I have > cal

[Rails] all custom helper modules being made available to all controllers without a call to helper?

2010-07-19 Thread frankjmat...@gmail.com
I have three different helper modules in my helpers directory (authentication_helper.rb... etc). In my views and partials I have calls to them but application_controller never directly calls the method #helper directly (as in helper AuthenticationHelper or helper :layout)... Shouldn't calls to tho

Re: [Rails] Re: Re: Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Walter McGinnis
The ghost gem achieves the same result as editing /etc/hosts and is much more convenient. http://kete.net.nz/documentation/topics/show/125-add-your-kete-application-to-etchosts-or-via-ghost-gem Cheers, Walter -- You received this message because you are subscribed to the Google Groups "Ruby on

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Michaël
On 19 July, 20:30, Bob Proulx wrote: > Micha l wrote: > > I want to be able to set those models to use a database on a > > different server. > > ... > > I've tried the following, but it doesn't seem to have any effect: > > I do this for switching between a legacy db and a new db.  It works > fin

[Rails] Re: Associations Problem

2010-07-19 Thread Frederick Cheung
On Jul 19, 9:26 pm, Leonardo Mateo wrote: > When I do the following in script/console: > s = LineItem.last.section (s.id is 21, as is LineItem.last.section_id as well) > s.target > > I get the Section instance, and the logger shows no query to the > targets table. However, if I do: > s = Sectio

Re: [Rails] ActiveRecord override

2010-07-19 Thread DK
Ps rails 2.3.5 ruby 1.8.7 On 7/19/10, David Kahn wrote: > Would really appreciate it if someone could tell me why this is happening: > > I override ssn method of AR class so I can encrypt/decrypt to/from the db: > > class Person < ActiveRecord::Base > def ssn=(value) > write_attribute(:borr

Re: [Rails] Re: Strange Error undefined method `show' for # see no way to debug, suggestions?

2010-07-19 Thread Colin Law
Could you not top-post please, it makes it difficult to follow the thread, insert your reply in the previous post instead. Thanks. On 19 July 2010 21:54, rubybox wrote: > I could go back to a backup but loose a lot of new work on the app > Still hope to find a fix somewhere but this error is rea

[Rails] Re: Strange Error undefined method `show' for # see no way to debug, suggestions?

2010-07-19 Thread rubybox
I could go back to a backup but loose a lot of new work on the app Still hope to find a fix somewhere but this error is really strange not anything else ive seen so far been able to debug all errors i came across with google perhaps its a system disk error, i repaired disk and no errors in my proje

[Rails] How to update user model attributes and bypass a presence_of validation?

2010-07-19 Thread Andrew Perkins
Hello, I have a user model which stores a users name, email, and password. I have a separate profile controller which lets the user edit his name, email, and password from the user model. I want the user to be able to update his name separately from his email as well as change his password separa

[Rails] Re: ActiveRecord override

2010-07-19 Thread Frederick Cheung
On Jul 19, 9:11 pm, David Kahn wrote: > > However, when I do Person.find(27) I get: > > # > > And then if I do p = Person.find(27), then I get the decrypted ssn. > > I know that find must be processing under the override methods, but I dont > understand why, as I thought if you overrode a metho

Re: [Rails] Re: Strange Error undefined method `show' for # see no way to debug, suggestions?

2010-07-19 Thread Colin Law
On 19 July 2010 20:16, rubybox wrote: > Anyone else some suggestions? > After removing the index.html.haml file i get the default missing > template error but if i open *any* other controller for example /post > i get EXACT the same error.. why is this happening ? > It seems that before any render

[Rails] Associations Problem

2010-07-19 Thread Leonardo Mateo
Hi guys, I'm having a strange error in one of my model relationships and it's driving me crazy I have: class Target < ActiveRecord::Base has_many :sections end class Section < ActiveRecord::Base belongs_to :target has_many :line_items end class LineItem < ActiveRecord::Base belongs_to :s

[Rails] Re: add a member to a pre-existing resource-route?

2010-07-19 Thread Jonathan Rochkind
Marnen Laibow-Koser wrote: > Jonathan Rochkind wrote: >> Rails2. If a route has already been established with "map.resources", >> is there any way I can add an additional member to it, without >> over-writing what's already there? > > Just define the route as you normally would (with map.connect

Re: [Rails] Re: What does this mean in the Rails installation command?

2010-07-19 Thread Colin Law
On 19 July 2010 15:50, Abder-Rahman Ali wrote: > Luciano Sousa wrote: >> abbreviation for "pre-release". is a version to be installed >> >> 2010/7/19 Abder-Rahman Ali > > Thanks. Can I specify a specific version. For example gem install rails --version 2.3.5 (that is two '-' chars). > > As for

[Rails] ActiveRecord override

2010-07-19 Thread David Kahn
Would really appreciate it if someone could tell me why this is happening: I override ssn method of AR class so I can encrypt/decrypt to/from the db: class Person < ActiveRecord::Base def ssn=(value) write_attribute(:borrower_ssn, Crypto.encrypt(self.encryption_key, value)) write_attrib

[Rails] render :update do |page| issue

2010-07-19 Thread Mamadou Touré
Hi Folks, I'm trying to render a partial from my controller, but nothing happens. What's wrong ? Heres are my controller, views, and partials 1 - Controller : def generer render :update do |page| page.replace_html( "message_div", :partial => "files_li

[Rails] Re: add a member to a pre-existing resource-route?

2010-07-19 Thread Marnen Laibow-Koser
Jonathan Rochkind wrote: > Rails2. If a route has already been established with "map.resources", > is there any way I can add an additional member to it, without > over-writing what's already there? > > This comes up in two engines-style plugins interacting with each other > and with the app itse

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Bob Proulx
Michaël wrote: > I want to be able to set those models to use a database on a > different server. > ... > I've tried the following, but it doesn't seem to have any effect: I do this for switching between a legacy db and a new db. It works fine. But I was doing it a slightly different way and it.

Re: [Rails] Re: Memcache

2010-07-19 Thread Jeffrey L. Taylor
Quoting Yani Yen : > After reading through a lot of blogs, everyone seems to say that > memcache-client seems to be faster and better. > > I installed memcache-client-1.8.5.gem > > And my configuration in environment.rb file is: > > memcache_options = { >:compression => true, >:debug =>

[Rails] Re: Strange Error undefined method `show' for # see no way to debug, suggestions?

2010-07-19 Thread rubybox
Anyone else some suggestions? After removing the index.html.haml file i get the default missing template error but if i open *any* other controller for example /post i get EXACT the same error.. why is this happening ? It seems that before any rendering is done it looks for an action "show" somehow

[Rails] add a member to a pre-existing resource-route?

2010-07-19 Thread Jonathan Rochkind
Rails2. If a route has already been established with "map.resources", is there any way I can add an additional member to it, without over-writing what's already there? This comes up in two engines-style plugins interacting with each other and with the app itself. -- Posted via http://www.ruby-fo

[Rails] Re: geokit app

2010-07-19 Thread Marnen Laibow-Koser
oliver torres wrote: > Newbie here :) > > So, a friend mentioned that geokit is the way to go if I want to make > a simple location based app. It may be; I've so far only used Spatial Adapter/GeoRuby. I'd also certainly advise using a database with geographical features. For me, that usually

[Rails] Re: two fields for same

2010-07-19 Thread Marnen Laibow-Koser
Luciano Sousa wrote: > hello guys, > it's possible pass two params in a GET request to the same location in > the > database? > > example: > > two fields in view: > text_field: persons,: Birthday: id => one > text_field: persons,: Birthday: id => two > > in the controller using params [: one] a

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Marnen Laibow-Koser
Michaël wrote: [...] > As far as load balancing is concerned, my ultimate goal is to push > that to the database level and have the database server handle that, > but I need to implement something quickly as an intermediate step. Then do it on the DB side now. It probably won't take any more time

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Michaël
On 19 July, 19:32, Frederick Cheung wrote: > On Jul 19, 6:08 pm, Michaël wrote: > > > > > > > Hi, > > I've tried the following, but it doesn't seem to have any effect: > > >      def build_report: > > >         Customer.establish_connection( > >             :adapter  => "mysql", > >            

Re: [Rails] two fields for same

2010-07-19 Thread Narendra sisodiya
Yes, it is possible.. just look at the form helper documentation at http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html On Mon, Jul 19, 2010 at 7:39 PM, Luciano Sousa wrote: > hello guys, > it's possible pass two params in a GET request to the same location in the > database? >

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Frederick Cheung
On Jul 19, 6:08 pm, Michaël wrote: > Hi, > I've tried the following, but it doesn't seem to have any effect: > >      def build_report: > >         Customer.establish_connection( >             :adapter  => "mysql", >             :host     => "hostname", >             :username => "user", >      

[Rails] Re: Changing a model's database connection

2010-07-19 Thread Marnen Laibow-Koser
Michaël wrote: > Hi, > > I've got a simple problem. I've got a collection of models, Customer, > Product and Shop, and they're all using the database configured for > the ActiveRecord class. However, for one particular task -- generating > a report -- I want to be able to set those models to use a

[Rails] Changing a model's database connection

2010-07-19 Thread Michaël
Hi, I've got a simple problem. I've got a collection of models, Customer, Product and Shop, and they're all using the database configured for the ActiveRecord class. However, for one particular task -- generating a report -- I want to be able to set those models to use a database on a different se

[Rails] Sr. Web Application Developer (RoR) Career Opportunity in San Francisco !!

2010-07-19 Thread Danny!
Title: Sr. Web Application Developer - San Francisco QUALIFICATIONS Candidates MUST have a background in Ruby-on-Rails (RoR); MUST use it for web application development not just creating web pages; NO interest in Web Designers. Candidates must have strong knowledge of the Ruby language, design p

[Rails] Re: Ruby on Rails template designs

2010-07-19 Thread Abder-Rahman Ali
Marnen Laibow-Koser wrote: > Abder-Rahman Ali wrote: >> Maybe more accurately to say, "Stylesheets" for Rails applications. Or, >> it is just a matter of adding .css that's all. >> >> But, you know, someone creating a RoR application, want the RoR touch on >> it! > > There is no "RoR touch" whe

[Rails] Re: Ruby on Rails template designs

2010-07-19 Thread Marnen Laibow-Koser
Abder-Rahman Ali wrote: > Maybe more accurately to say, "Stylesheets" for Rails applications. Or, > it is just a matter of adding .css that's all. > > But, you know, someone creating a RoR application, want the RoR touch on > it! There is no "RoR touch" when it comes to visual design. HTML and

[Rails] Re: XML parsing, block name with minus

2010-07-19 Thread Marnen Laibow-Koser
Szymon Przybył wrote: [...] > But it throws undefined local variable or method `partwise' for > #, becouse in symbols names minus sign > is prohibited. How can I make a symbol name with minus sign? Well, you can actually have any characters you like in a symbol name. The :name syntax only works i

[Rails] Re: Re: Re: system("AcroRd32.exe ")

2010-07-19 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: > Mamadou Touré wrote: >> Colin Law wrote: >> >>> >>> But why do you want to do it on the users PC? You say that 'I' need >>> to do that, not 'the user' needs to do that. Generally anything that >>> 'I' need to do must be run on the server. Why can you not do the >>>

[Rails] Re: bundle install

2010-07-19 Thread Abder-Rahman Ali
Thanks a lot Peter for your EXCELLENT support. -- 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-t...@googlegroups.com. To unsubscribe from this gro

[Rails] Protect from forgery for Rest destroy action ???

2010-07-19 Thread Vinh Chuc
Hi !! I'm reading the rails guides about security, i had a question about the forgery protection If we consider a standard Restful resource ( generated with scaffold for example ), the update and create actions are protected from forgery attacks thanks to the authenticity token, but what about the

Re: [Rails] bundle install

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 18:28, Abder-Rahman Ali wrote: What does the command: bundle install do? It seems also that it only works with Rails3? First, you need to install the bundler gem sudo gem install bundler Then you need to add a Gemfile to your Rails app root folder (the one with all

[Rails] Updated to Rails 3.0.0.beta4. Is it the problem?

2010-07-19 Thread Abder-Rahman Ali
I have updated to Rails 3.0.0.beta4 I'm trying to install this plugin: http://github.com/plataformatec/devise There is a command I'm trying to run: rails generate devise:install But, I get the following: http://pastie.org/1050651 For example, in Rails 2.3.8, when I used to create a new Rails ap

Re: [Rails] Re: Re: Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Rimantas Liubertas
>> or set up a local dns server, which would be even better > > Not sure how. Any suggestions? I've heard of BIND but not sure that's > valid for Mac OS 10.6. But sooner or later I have to get a better grip > of DNS and DNS servers. Do you need lots of subdomains (like one per user)? If not simple

[Rails] Re: Re: Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Pål Bergström
Peter De Berdt wrote: > or set up a local dns server, which would be even better Not sure how. Any suggestions? I've heard of BIND but not sure that's valid for Mac OS 10.6. But sooner or later I have to get a better grip of DNS and DNS servers. -- Posted via http://www.ruby-forum.com/. -- Y

[Rails] bundle install

2010-07-19 Thread Abder-Rahman Ali
What does the command: >> bundle install do? It seems also that it only works with Rails3? Thanks. -- 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 rubyon

[Rails] Re: Re: Re: system("AcroRd32.exe ")

2010-07-19 Thread Marnen Laibow-Koser
Mamadou Touré wrote: > Colin Law wrote: > >> >> But why do you want to do it on the users PC? You say that 'I' need >> to do that, not 'the user' needs to do that. Generally anything that >> 'I' need to do must be run on the server. Why can you not do the >> manipulation on the server? Not th

[Rails] Re: Re: Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
Peter De Berdt wrote: > On 19 Jul 2010, at 17:57, Abder-Rahman Ali wrote: > >> I found that Ruby is in: /opt/local/bin/ruby >> >> Should I move it to /usr/local/bin ? > > Sounds to me like you have installed MacPorts already. Why didn't you > just install git through macports too then? > > sudo

[Rails] Re: functional tests - setup and teardown

2010-07-19 Thread Marnen Laibow-Koser
bingo bob wrote: > why? Why what? Please quote when replying so we know what you're replying to. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby

[Rails] Re: functional tests - setup and teardown

2010-07-19 Thread bingo bob
why? -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubs

[Rails] Rails 3 RC

2010-07-19 Thread Ken Foust
What happened to the release -- 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-t...@googlegroups.com. To unsubscribe from this group, send email

[Rails] Re: Re: Re: Setting a root_url

2010-07-19 Thread Abder-Rahman Ali
Luciano Sousa wrote: > exactly > try it and say it did. > > 2010/7/19 Abder-Rahman Ali Thanks Luciano. Sorry, it seems I sent the wrong user_sessions_controller.rb, but still getting the same issue I mentioned. This is the user_sessions_controller.rb I have. What do you think? Attachments:

[Rails] Re: functional tests - setup and teardown

2010-07-19 Thread Marnen Laibow-Koser
bingo bob wrote: > Hi all, > > functional test help please, > > http://pastie.org/1049300 > > lines 5 to 8 simulate a login; all fine, but after line 56 I'd like to > test the reverse that everything is blocked when the user is not logged > in. So the question is how could I not do that setup ro

Re: [Rails] Re: Re: Git on MAC OS X

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:57, Abder-Rahman Ali wrote: I found that Ruby is in: /opt/local/bin/ruby Should I move it to /usr/local/bin ? Sounds to me like you have installed MacPorts already. Why didn't you just install git through macports too then? sudo port install git-core Best regard

[Rails] Re: Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
I found that Ruby is in: /opt/local/bin/ruby Should I move it to /usr/local/bin ? -- 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-t...@googlegrou

Re: [Rails] Re: Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:48, Pål Bergström wrote: So what did you do then? Point the top root of the nginx server to your Rails' public folder? Good question. :-) I did a mistake. I followed the tutorial at mod_rails. I should have understood that I have to set it up the same way I have it with

[Rails] Re: Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Pål Bergström
Peter De Berdt wrote: > On 19 Jul 2010, at 17:25, Pål Bergström wrote: > > So what did you do then? Point the top root of the nginx server to > your Rails' public folder? Good question. :-) I did a mistake. I followed the tutorial at mod_rails. I should have understood that I have to set it up

[Rails] Re: Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
Rimantas Liubertas wrote: >> Not mine! 10.5.8 is not there. > > Did you ever try any of those listed? > Does not > http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.1-intel-leopard.dmg&can=3&q= > work for you? > > Regards, > Rimantas Thanks Rimantas. I'll check Andy's sol

Re: [Rails] Re: Re: Setting a root_url

2010-07-19 Thread Luciano Sousa
exactly try it and say it did. 2010/7/19 Abder-Rahman Ali > Luciano Sousa wrote: > > creat one method index with a list to all users and one index.html.erb > > in > > app/views/user with a list too. > > > > 2010/7/19 Abder-Rahman Ali > > Thanks Luciano. > > Do you mean in the index method a li

Re: [Rails] Re: Git on MAC OS X

2010-07-19 Thread Andy Jeffries
On 19 July 2010 16:38, Abder-Rahman Ali wrote: > I now added /usr/local/bin to my path as follows: > > export PATH=$PATH:/usr/local/bin > > http://www.how-to-linux.com/2010/04/how-to-add-usrlocalbin-to-your-path-on-centos/ Good job. > But, when I run now: brew install git > > I get the follow

Re: [Rails] Re: Git on MAC OS X

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:34, Abder-Rahman Ali wrote: Oh, Andy, I forgot to mention that after installing homebrew, I got the following: Warning: /usr/local/bin is not in your PATH. Well, you could have google'd what that warning means to start off with. Edit ~/.bash_login (only your user) or

[Rails] Forking and integration tests

2010-07-19 Thread Mohammad Badrah
Hi All, I had a bug in one project, that data get duplicated in the DB due to multiple instances of the application (multiple thins) are accessing the DB at the same time .. The typical mistake. Problem fixed. I just need to write a test code that covers the fixed bug. I need to simulate the co

[Rails] Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
I now added /usr/local/bin to my path as follows: export PATH=$PATH:/usr/local/bin http://www.how-to-linux.com/2010/04/how-to-add-usrlocalbin-to-your-path-on-centos/ But, when I run now: brew install git I get the following: -bash: /usr/local/bin/brew: /usr/bin/ruby: bad interpreter: No such fi

Re: [Rails] Re: Git on MAC OS X

2010-07-19 Thread Rimantas Liubertas
> Not mine! 10.5.8 is not there. Did you ever try any of those listed? Does not http://code.google.com/p/git-osx-installer/downloads/detail?name=git-1.7.1-intel-leopard.dmg&can=3&q= work for you? Regards, Rimantas -- You received this message because you are subscribed to the Google Groups "Ru

[Rails] Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
Oh, Andy, I forgot to mention that after installing homebrew, I got the following: Warning: /usr/local/bin is not in your PATH. -- 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 g

Re: [Rails] Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:25, Pål Bergström wrote: I run Nginx not Apache. For development on localhost, so I don't need dns. I don't get an error in the log file. Just that the browser can't find the server. So what did you do then? Point the top root of the nginx server to your Rails' public

[Rails] Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
Andy Jeffries wrote: > On 19 July 2010 15:46, Abder-Rahman Ali wrote: > >> I know that this question may not be here, but think that most of you >> using RoR deal with Git. >> >> I run a MAC OS X 10.5.8, and want to install Git running on my machine. >> But, I didn't find this version of my MAC O

[Rails] Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Pål Bergström
Peter De Berdt wrote: > On 19 Jul 2010, at 17:05, Pål Bergström wrote: > > Woops, instead of Apache not running, it seems nginx isn't running > properly. > > Check it with: > ps ax | grep nginx > It's running :-) -- Posted via http://www.ruby-forum.com/. -- You received this message becau

[Rails] Re: Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Pål Bergström
Peter De Berdt wrote: > On 19 Jul 2010, at 17:05, Pål Bergström wrote: > > Sounds to me apache isn't running or your vhosts don't resolve. When > Passenger fails, you get a Passenger error screen describing the > error, it never results in server not found. I run Nginx not Apache. For developmen

[Rails] Re: Git on MAC OS X

2010-07-19 Thread Abder-Rahman Ali
Not mine! 10.5.8 is not there. -- 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-t...@googlegroups.com. To unsubscribe from this group, send email t

[Rails] Re: Re: Setting a root_url

2010-07-19 Thread Abder-Rahman Ali
Luciano Sousa wrote: > creat one method index with a list to all users and one index.html.erb > in > app/views/user with a list too. > > 2010/7/19 Abder-Rahman Ali Thanks Luciano. Do you mean in the index method a list to all user sessions? Such as: @user_session = UserSession.all Thanks. --

Re: [Rails] Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:05, Pål Bergström wrote: And what errors are you getting? The browser can't find the server. Woops, instead of Apache not running, it seems nginx isn't running properly. Check it with: ps ax | grep nginx This can be because Apache is up and running, make sure it's

Re: [Rails] Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Peter De Berdt
On 19 Jul 2010, at 17:05, Pål Bergström wrote: And what errors are you getting? The browser can't find the server. Sounds to me apache isn't running or your vhosts don't resolve. When Passenger fails, you get a Passenger error screen describing the error, it never results in server not

Re: [Rails] Re: Does Nginx with Passenger actually work?

2010-07-19 Thread David Kahn
When I tried installing it on OSX, I came to the conclusion that things were not working due to permissions on the Mac -- if I remember right, between Passenger and the folder in which my app sits, as I was probably running Passenger under sudo. I gave up as I was really aiming to get things workin

[Rails] sortable_element - multiple ajax events

2010-07-19 Thread Ben
So I'm using sortable_element to order a list. The problem I'm having is that if I move two items in the list very quickly, I lose the second move update because the backend doesn't deal with the requests in sequence. It updates the database for the second move first and then over writes that with

[Rails] Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Pål Bergström
Marnen Laibow-Koser wrote: > Pål Bergström wrote: > And what errors are you getting? The browser can't find the server. > Anyway, unless you are using your Mac as a server, why are you running > Passenger on it in the first place? Mongrel is perfectly suitable for > development. Well why not

Re: [Rails] Re: Git on MAC OS X

2010-07-19 Thread jason white
+1 for homebrew On Mon, Jul 19, 2010 at 9:58 AM, Marnen Laibow-Koser wrote: > Abder-Rahman Ali wrote: > > I know that this question may not be here, but think that most of you > > using RoR deal with Git. > > > > I run a MAC OS X 10.5.8, and want to install Git running on my machine. > > But, I d

[Rails] Re: Strange Error undefined method `show' for # see no way to debug, suggestions?

2010-07-19 Thread rubybox
Hi Fred, Thanks for pointing that out , i thought of a code error somewhere but after I delete the index.html.haml it throws error missing template index.html.haml now I recreated the file with a blank file no contents but then the error pops up again, it could be some disk based issue so im now

[Rails] Re: Git on MAC OS X

2010-07-19 Thread Marnen Laibow-Koser
Abder-Rahman Ali wrote: > I know that this question may not be here, but think that most of you > using RoR deal with Git. > > I run a MAC OS X 10.5.8, and want to install Git running on my machine. > But, I didn't find this version of my MAC OS X here: Hi, > > http://code.google.com/p/git-osx-in

Re: [Rails] Re: Does Nginx with Passenger actually work?

2010-07-19 Thread Andy Jeffries
> > Anyway, unless you are using your Mac as a server, why are you running > Passenger on it in the first place? Mongrel is perfectly suitable for > development. > A lot of people: 1) Work on more than one site at a time (during a day) 2) Want it always available rather than having to remember

Re: [Rails] Re: Setting a root_url

2010-07-19 Thread Luciano Sousa
creat one method index with a list to all users and one index.html.erb in app/views/user with a list too. 2010/7/19 Abder-Rahman Ali > Thanks. Attached you can find the user_sessions_controller.rb file. > > Attachments: > http://www.ruby-forum.com/attachment/4865/user_sessions_controller.rb > >

Re: [Rails] Git on MAC OS X

2010-07-19 Thread Andy Jeffries
On 19 July 2010 15:46, Abder-Rahman Ali wrote: > I know that this question may not be here, but think that most of you > using RoR deal with Git. > > I run a MAC OS X 10.5.8, and want to install Git running on my machine. > But, I didn't find this version of my MAC OS X here: Hi, > > http://code.

[Rails] Re: rake db:create:all

2010-07-19 Thread Abder-Rahman Ali
Colin Law wrote: > On 14 July 2010 21:35, Abder-Rahman Ali wrote: >> you just clarify a bit? Especially that database.yml will already have >> databases? > > Normally in database.yml you define the development, production and > test databases. If all is specified then it creates all of these. I

  1   2   >