[Rails] Re: specifying 2 different layouts in controller

2009-11-23 Thread mrbless
write something like this layout :compute_layout protected def compute_layout if action_name=="statistics" return "stat_report" else return "reports" end On Nov 24, 7:19 am, Craig White wrote: > On Mon, 2009-11-23 at 18:09 -0800, eggie5 wrote: > > layout "report

[Rails] Re: seed_fu v. populate data from migration

2009-11-23 Thread Thufir
On Nov 22, 12:54 pm, Rick DeNatale wrote: [...] > > Certainly.  The rake migration, or migration to version, worked fine > > providing no data was written to the db from the migration. > > Because when you had those lines commented out, there was no reference > to a Url Ruby class. Exactly, just

Re: [Rails] specifying 2 different layouts in controller

2009-11-23 Thread Craig White
On Mon, 2009-11-23 at 18:09 -0800, eggie5 wrote: > layout "reports", :except => [:statistics] > layout "stat_report", :only => [:statistics] > > I want to specify the use of 2 different layout in my controller but > the above syntax doesn't work? How can I do this? 어떻게 하죠? keep the first, d

[Rails] specifying 2 different layouts in controller

2009-11-23 Thread eggie5
layout "reports", :except => [:statistics] layout "stat_report", :only => [:statistics] I want to specify the use of 2 different layout in my controller but the above syntax doesn't work? How can I do this? 어떻게 하죠? -- You received this message because you are subscribed to the Google Groups

Re: [Rails] Re: Beginner's challenge

2009-11-23 Thread Darwin Pintado
Yes, I need to know how to run a full trace (See full trace by running task with --trace) On Tue, Nov 24, 2009 at 3:05 AM, Leonardo Mateo wrote: > On Mon, Nov 23, 2009 at 4:00 PM, dwhitekiss wrote: > > How should I generate a fulltrace according to comment below > > > > C:\>rake rails:update >

[Rails] Re: issues with mysql on windows

2009-11-23 Thread MarcRic
Rick, > mysql --version => > mysql Ver 14.14 Distrib 5.1.39, for apple-darwin9.5.0 (powerpc) using > readline 5.1 You are using 5.1.39... Need to test with 5.0.xx... Regards. On Nov 22, 10:32 pm, Rick wrote: > Nope, at least with leopard (can't confirm snow-leopard) MacOSX 10.5.8 > running R

[Rails] Re: Advice for SOAP with no wsdl?

2009-11-23 Thread Sebastian von Conrad
Would it be possible for you to contact the fulfiller and ask for a WSDL file? Even if they don't have it publicly available, it might still be possible for them to have one lying around. I have encountered this very same problem where the SOAP interface existed but did not have a WSDL--the problem

[Rails] Problem with association when getting a validation error on update

2009-11-23 Thread SergioMB
Quick overview: 2 classes- class Building < ActiveRecord::Base has_many :styles, :dependent => :destroy validates_presence_of :address1 accepts_nested_attributes_for :styles, :allow_destroy => true end class Style < ActiveRecord::Base belongs_to :building end The sequence of my problem

Re: [Rails] Re: Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread Juan Pablo Genovese
Por nada! Buena elección. :) You're welcome. Good choice. :) 2009/11/23 Mike > Thank you everybody! I started using GIT and NetBeans. > > > On 23 nov, 16:11, Leonardo Mateo wrote: > > On Mon, Nov 23, 2009 at 5:12 PM, Mike wrote: > > > Hello, > > > > > I am going to start a new project in R

Re: [Rails] passenger memory

2009-11-23 Thread Peter De Berdt
On 23 Nov 2009, at 22:22, Trausti Thor Johannsson wrote: > I am using ruby-enterprise-1.8.7-20090928 and passenger on Centos > 5.2, x86_64. > > passenger-memory-stats gives me that my app is using 466 MB (and > growing). What can I do to prevent this enormous eating ? Find out what's leaking

[Rails] Re: Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread Mike
Thank you everybody! I started using GIT and NetBeans. On 23 nov, 16:11, Leonardo Mateo wrote: > On Mon, Nov 23, 2009 at 5:12 PM, Mike wrote: > > Hello, > > >     I am going to start a new project in Rails, we are a small team > > of 4 people, I want this project be developed in a coolaborative

Re: [Rails] Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread Leonardo Mateo
On Mon, Nov 23, 2009 at 5:12 PM, Mike wrote: > Hello, > >     I am going to start a new project in Rails, we are a small team > of 4 people, I want this project be developed in a coolaborative way. > What is the best choice for this team, I talk about an IDE for Rails > and VCS, so we can all work

[Rails] Re: Soft Deletes

2009-11-23 Thread stuart.coyle
I've used the acts_as_paranoid plugin successfully for this. On Nov 24, 3:21 am, Chris Drappier wrote: > we do this in conjunction with versioning our records, makes it very easy to > pull associations through history. You're definitely on the right track. > > On Mon, Nov 23, 2009 at 11:12 AM, bi

[Rails] Re: Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread E. Litwin
You should also use Linux or OS/X for your environment. I have a Windows machine at work, but use a Linux VM for all my development. Git is essential. I used to use Netbeans, but have switched to Komodo Edit. I didn't need a heavy IDE, just a text editor. On Nov 23, 12:56 pm, Juan Pablo Genovese

Re: [Rails] Problems uploading files

2009-11-23 Thread Mehmet Davut
When i programming something with uploading, problem is with form. I forget to add multipart tag to form. Are you ok with that? On Mon, 2009-11-23 at 09:15 -0800, PenguinJr wrote: > Hello, i have problem when i upload files to the website, i can't > understand it. I use Apache 2 + Ubuntu, and Apac

[Rails] passenger memory

2009-11-23 Thread Trausti Thor Johannsson
Hi All, I am using ruby-enterprise-1.8.7-20090928 and passenger on Centos 5.2, x86_64. passenger-memory-stats gives me that my app is using 466 MB (and growing). What can I do to prevent this enormous eating ? Best regards, Trausti -- You received this message because you are subscribed to

Re: [Rails] limit times of updating status

2009-11-23 Thread Rob Biedenharn
On Nov 23, 2009, at 3:08 PM, señor tower wrote: > Guys - newbie here with big question - at least for me is big :) > (pardon if i dont refer to things with the proper terms) > > I have a controller here that lets a user update their status > infinitively but what I want to do is > limit them to sa

Re: [Rails] Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread Juan Pablo Genovese
Hi Mike, we have a very similar team setup. If you want to go completly free, try Netbeans with the Rails Plugin. For us, is the best free IDE out there for Ruby and Ruby On Rails. We switched to RubyMine (paid) but it is really awesome... couldn't be happier. For VCS, we use Git without any doub

[Rails] Re: Extract Domain name (url)

2009-11-23 Thread fort
On Nov 12, 1:16 pm, Tony Amoyal wrote: > Oops, forgot to add the other function i was using: > # Prepend URL with http if necessary >   def self.fix_url(u) >     !!( u !~ /\A(?:http:\/\/|https:\/\/)/i ) ? "http://#{u}"; : u >   end > > Note that you need to require uri: > > require 'uri' > > I put

[Rails] Re: mysql rake functions failing

2009-11-23 Thread dan
i was able to set default charset to utf8...still getting error running rake db:create please see full detail of issues here: http://railsforum.com/viewtopic.php?pid=113115 thanks On Nov 10, 4:23 am, Rick wrote: > I use the MySQL Administrator gui, Options -> Advanced. > > http://dev.mysql.c

[Rails] Re: Learning ruby on Mac - rake create error

2009-11-23 Thread dan
i still have not found a solution to this problem i have reached out to a few sources for help my most detailed list of issues can be found here: http://railsforum.com/viewtopic.php?pid=113115 its very frustrating...cannot create a db using mysql on mac On Nov 22, 7:28 am, Martin Streicher wro

[Rails] Best option for a small team of developers (VCS, IDE)?

2009-11-23 Thread Mike
Hello, I am going to start a new project in Rails, we are a small team of 4 people, I want this project be developed in a coolaborative way. What is the best choice for this team, I talk about an IDE for Rails and VCS, so we can all work in same project at same time? We have Windows as O

[Rails] limit times of updating status

2009-11-23 Thread señor tower
Guys - newbie here with big question - at least for me is big :) (pardon if i dont refer to things with the proper terms) I have a controller here that lets a user update their status infinitively but what I want to do is limit them to say only update their status 5 times a day... meaning every 24

[Rails] Re: Using mongrel_rails: Can't install Redmine as win2003 service

2009-11-23 Thread SA
FWIW: I just discovered that if I uninstall the 0.7.0 version of the win232-service gem and install this one instead: gem install -v=0.5.2 win32-service I can now install mongrel services w/o error. On Nov 23, 11:59 am, SA wrote: > I think I am seeing the same issue. See also versions of va

[Rails] Re: after updated to leopard

2009-11-23 Thread señor tower
i think i did but not sure anymore, take a look: dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find: /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper while executing "load /opt/loca

Re: [Rails] Re: Beginner's challenge

2009-11-23 Thread Leonardo Mateo
On Mon, Nov 23, 2009 at 4:00 PM, dwhitekiss wrote: > How should I generate a fulltrace according to comment below > > C:\>rake rails:update > rake aborted! > No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, > Rakefile.rb) > C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143

[Rails] Re: Beginner's challenge

2009-11-23 Thread dwhitekiss
How should I generate a fulltrace according to comment below C:\>rake rails:update rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2143:in `raw_load_rakefile ' (See full trace by running task with --t

Re: [Rails] Re: Beginner's challenge

2009-11-23 Thread Darwin Pintado
$ gem install sqlite3-ruby ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ETIMEDOUT: Connection timed out - connect(2) ( http://gems.rubyforge.o rg/gems/sqlite3-ruby-1.2.5.gem) On Mon, Nov 23, 2009 at 11:33 PM, eugenio wrote: > what challenges? > if you didn't cha

[Rails] Problems uploading files

2009-11-23 Thread PenguinJr
Hello, i have problem when i upload files to the website, i can't understand it. I use Apache 2 + Ubuntu, and Apache returns Error 500 (captured by the application) I use attachment and shared-mime-info and i don't understand why don't work, temp files are written with 600, and not 644 :S Sometim

Re: [Rails] Soft Deletes

2009-11-23 Thread Chris Drappier
we do this in conjunction with versioning our records, makes it very easy to pull associations through history. You're definitely on the right track. On Mon, Nov 23, 2009 at 11:12 AM, bill walton wrote: > Hi Mike, > > On Mon, 2009-11-23 at 07:45 -0800, Mike Gehard wrote: > > I'm thinking that th

Re: [Rails] Soft Deletes

2009-11-23 Thread bill walton
Hi Mike, On Mon, 2009-11-23 at 07:45 -0800, Mike Gehard wrote: > I'm thinking that the simple addition of a deleted_at column, some > named scopes (maybe even a default scope) and a handler on delete to > set the deleted_at column and prevent the actual DB delete will do the > trick. Any gotchas

[Rails] Re: Using mongrel_rails: Can't install Redmine as win2003 service

2009-11-23 Thread SA
I think I am seeing the same issue. See also versions of various gems. This used to work with the 0.3.4 version of the mongrel_service gem. Is there a fix or update for this. I want to avoid hacking line 115 / ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_service/ init.rb if possible.

[Rails] Re: Advice for SOAP with no wsdl?

2009-11-23 Thread Lance Woodson
That is a possibility, though it would be something that I'm not terribly familiar/comfortable with. Thanks for the idea. On Nov 22, 10:25 am, Frederick Cheung wrote: > On Nov 22, 1:29 pm, Lance Woodson wrote: > > > I am integrating with a merchandise fulfillment company on behalf of a > > clie

[Rails] Re: How can a rails app get its host name?

2009-11-23 Thread shweta
Try request.env['HTTP_HOST'] in the controller. -- 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

Re: [Rails] Re: unsigned int in migration

2009-11-23 Thread Greg Donald
On Mon, Nov 23, 2009 at 10:13 AM, Matt Jones wrote: > There's not a way to do so, as far as I know. Somewhat offtopic, why > do you believe that unsigned is preferable? Yes, it has twice as much > range, but if your DB has 2 billion objects in it and needs more - > you've likely got other problems

[Rails] Re: unsigned int in migration

2009-11-23 Thread eugenio
you are right. but because they're use the same memory i thought it would be correct to let the application to use all of them if needed. i think it's just a mysql habit i got. thanks. On 23 Nov, 17:13, Matt Jones wrote: > On Nov 22, 11:44 am, eugenio wrote: > > > i noticed that rails create sig

[Rails] Re: WARNING: Can't mass-assign these protected attributes: active

2009-11-23 Thread Matt Jones
On Nov 21, 9:46 pm, João Pereira wrote: > @user.update_attributes!(:active=>1) > > and in the model I don't have the param active :marked as attr_accessible. > And the following warning messages is logged and the record is not updated > > WARNING: Can't mass-assign these protected attributes: ac

[Rails] Re: unsigned int in migration

2009-11-23 Thread Matt Jones
On Nov 22, 11:44 am, eugenio wrote: > i noticed that rails create signed int(11) for id fields (i'm using > mysql, i don't know if it acts like this with different databases). > i think that unsigned is better for primary keys (and foreign keys). > Is there an easy way to indicate that in a migr

[Rails] Re: Soft Deletes - Let's try this again...

2009-11-23 Thread eugenio
i simply use the destroy action and a date column for that. On 23 Nov, 16:48, Mike Gehard wrote: > Hello all, > > It seems that my first posting got into some sort of limbo so > apologies for the repost... > > I am wondering how people here are handling soft deletes in Rails. > I've need a couple

[Rails] Soft Deletes - Let's try this again...

2009-11-23 Thread Mike Gehard
Hello all, It seems that my first posting got into some sort of limbo so apologies for the repost... I am wondering how people here are handling soft deletes in Rails. I've need a couple of gems/plugins that seem to handle this but from what I gather development has stopped on them. All I need

[Rails] Soft Deletes

2009-11-23 Thread Mike Gehard
Hello all, I am wondering how people here are handling soft deletes in Rails. I've need a couple of gems/plugins that seem to handle this but from what I gather development has stopped on them. All I need to do right now is mark something as deleted in the DB...nothing fancy. I'm thinking that t

[Rails] Re: Beginner's challenge

2009-11-23 Thread eugenio
what challenges? if you didn't change things you are in development environment and you are using sqlite. so run 'rake db:migrate' and it will create your database. if it doesn't check if you installed the gem sqlite3-ruby. if you still got an error, PASTE it, maybe someone could help you. On 23

[Rails] mysql replication and rails

2009-11-23 Thread eugenio
i would like to use some kind of replication (master -> slave or, better, master <-> master) to provide better performance and fail- over. as i read, multi-master replication in mysql is quite problematic: i'm talking about duplicate key problem. so i was searching about plugins that make rails aw

[Rails] about open id authuntication

2009-11-23 Thread mchenz
hai. i am using open_id_authuntication plugin .any one help me to get name and email from yahoo open id .. -- 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.

Re: [Rails] WARNING: Can't mass-assign these protected attributes: name, password, email

2009-11-23 Thread Rob Biedenharn
Or you meant to say: attr_accessor to simply add the *_confirmation attributes that aren't stored in the database. If you were going to use attr_accessible, then you'd probably want :name in there if you wanted User.update_attributes(params[:user]) to actually update the user's name from

[Rails] Mongrel hangs when idle

2009-11-23 Thread Murugaraj
Hello All, This issue has been raised by so many people in this forum and in the web before. But i am not sure, whether all of those got fixed the issue. My application is running in 1)rails 2.2.2 2)ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] 3)MySQL 5.1.30-ndb-6.3.20-cluster-gpl MySQL

[Rails] Beginner's challenge

2009-11-23 Thread dwhitekiss
Hello, I begun my journey in Ruby on Rails last Saturday and I am having some challenges specifically about the db Where should I go for the specific error listing and how it may be resolved. I googled and most that I've searched are not helpful. D -- You received this message because you are

[Rails] passenger 2.2.7 uses config.ru but starts in development environment

2009-11-23 Thread Alex Gusev
Hi. Today i updated passenger to new 2.2.7 version and my app started to work incorrectly, because it lauched in development environment. I tried to set "RailsEnv production", "RackEnv production" at my httpd.conf, but this dont work. So, maybe somenthing wrong with my config.ru? #!/usr/bin/env

[Rails] Form update help

2009-11-23 Thread Graeme
Im trying to teach myself rails by creating a training log application and Im wondering what the best practice for generating activities when a certain sport is selected would be. I generated a athletes scaffold and edited the form with a select box for the sport and once you selct the sport I want

Re: [Rails] unsigned int in migration

2009-11-23 Thread Jeffrey L. Taylor
Quoting eugenio : > i noticed that rails create signed int(11) for id fields (i'm using > mysql, i don't know if it acts like this with different databases). > i think that unsigned is better for primary keys (and foreign keys). > Is there an easy way to indicate that in a migration? > This comes

[Rails] One Click On Windows 7

2009-11-23 Thread Kewdah
Finally got the one click installer (1.86-27rc2) installed and functional on Windows 7. Only I could get Gem to install Rails was to install in Windows compatibility mode -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gro

[Rails] Soft Deletes

2009-11-23 Thread Mike Gehard
Hello all, I am wondering how people here are handling soft deletes in Rails. I've need a couple of gems/plugins that seem to handle this but from what I gather development has stopped on them. All I need to do right now is mark something as deleted in the DB...nothing fancy. I'm thinking that t

[Rails] Re: WARNING: Can't mass-assign these protected attributes: active

2009-11-23 Thread Frederick Cheung
On Nov 22, 2:46 am, João Pereira wrote: > user_id =params[:id] > @user = User.find(user_id) > @user.update_attributes!(:active=>1) > > and in the model I don't have the param active :marked as attr_accessible. > And the following warning messages is logged and the record is not updated > > WARNING