[Rails] sudo gem install rails not working because of problem with alias_method and is_file

2013-01-12 Thread Alex M.
I had downloaded ruby, rails, and rubygems previously on my hard drive when I ran Windows. I just downloaded Ubuntu and tried to use RoR but it wasn't working, so I figured I had to follow the installation procedure listed here http://guides.rubyonrails.org/getting_started.html to get it working. W

[Rails] How do I set rails generator properties?

2013-01-12 Thread tamouse mailing lists
In a rails app I'm working on, when I invoke `rails generate scaffold Model` it uses the `inherited_resources_controller` instead of `scaffold_controller`. I'm not sure when it started doing this, but I'd like it to stop doing that. I'm trying to figure out where this is set and can't seem to find

[Rails] Re: Re: postgresql sequence and migrations

2013-01-12 Thread Bob Gustafson
Bob Gustafson wrote in post #1092090: > Lance wrote in post #93083: >> There is a method in the Postgresql adapter called reset_pk_sequence. I >> haven't used it yet but it sounds like this is what you are looking for. > > I used it: > > Account.delete_all > Account.reset_pk_sequence > > but, it d

[Rails] Re: Re: postgresql sequence and migrations

2013-01-12 Thread Bob Gustafson
Lance wrote in post #93083: > There is a method in the Postgresql adapter called reset_pk_sequence. I > haven't used it yet but it sounds like this is what you are looking for. I used it: Account.delete_all Account.reset_pk_sequence but, it didn't work. The next Account.save had the :id = last

Re: [Rails] showing posts in blog

2013-01-12 Thread Dheeraj Kumar
http://guides.rubyonrails.org/security.html#mass-assignment -- Dheeraj Kumar On Sunday 13 January 2013 at 4:30 AM, James Jack-Been wrote: > When I make a new post in my blog, it returns this when I try to view my > current posts: > > -

[Rails] showing posts in blog

2013-01-12 Thread James Jack-Been
When I make a new post in my blog, it returns this when I try to view my current posts: --- ActiveModel::MassAssignmentSecurity::Error in PostsController#create Can't mass-assign protected attributes: text Rails.root: C:/U

[Rails] Re: Send mail on Rails.logger.error

2013-01-12 Thread Frederick Cheung
On Jan 12, 1:47 pm, vhochstein wrote: > Hi, > > I would like to receive an email, if anywhere in my application a > Rails.logger.errror method is triggered. > > I know about all these exception_notfiers, but Rails.logger.error is > triggered without an exception as well in my application and the

Re: [Rails] Send mail on Rails.logger.error

2013-01-12 Thread tamouse mailing lists
On Sat, Jan 12, 2013 at 6:47 AM, vhochstein wrote: > Hi, > > I would like to receive an email, if anywhere in my application a > Rails.logger.errror method is triggered. > > I know about all these exception_notfiers, but Rails.logger.error is > triggered without an exception as well in my applicat

Re: [Rails] Different application session depending on path

2013-01-12 Thread tamouse mailing lists
On Fri, Jan 11, 2013 at 4:56 AM, Gustavo de Sá Carvalho Honorato wrote: > Hi, > > I have a multitenant app and each tenant 'lives' in a subdirectory of my > app. For example: > > http://www.myapp.com/tenant1 > http://www.myapp.com/tenant2 > > The problem is that if a tenant1 user logs in he automa

[Rails] Send mail on Rails.logger.error

2013-01-12 Thread vhochstein
Hi, I would like to receive an email, if anywhere in my application a Rails.logger.errror method is triggered. I know about all these exception_notfiers, but Rails.logger.error is triggered without an exception as well in my application and these exception_notfier gems will not catch them. Wo