Re: [Rails] Not able to create test database for cucumber in postgres?

2012-11-05 Thread Fahim Patel
On Monday, November 5, 2012 8:11:23 PM UTC+5:30, Walter Lee Davis wrote: > > > On Nov 5, 2012, at 9:11 AM, Fahim Patel wrote: > > > Hi all, > > > > > > I create "app_test" database in postgres with my accurate owner name. > > and when i fire rake db:test:prepare i am getting error :- > >

Re: [Rails] Not able to create test database for cucumber in postgres?

2012-11-05 Thread Fahim Patel
On Monday, November 5, 2012 8:11:23 PM UTC+5:30, Walter Lee Davis wrote: > > > On Nov 5, 2012, at 9:11 AM, Fahim Patel wrote: > > > Hi all, > > > > > > I create "app_test" database in postgres with my accurate owner name. > > and when i fire rake db:test:prepare i am getting error :- > >

[Rails] Configuring proper sequence of Rack middlewares ...

2012-11-05 Thread kedar mhaswade
I am running into a situation where I can't ensure the proper sequence of Rack middlewares. I have two middlewares in my Rails 3.0.9 stack: 1- ExceptionNotifier 2- ActionDispatch::ShowExceptions The first one is a gemthat notifies me (

Re: [Rails] has_one relation and form_for

2012-11-05 Thread Jean
Thanks Tommaso, It works, but the user_id has this User:0x007fe37d33b5e0 no User:1, is that ok??? On Monday, November 5, 2012 6:25:23 PM UTC-4:30, Tommaso Visconti wrote: > > Jean ha scritto: > > Thanks Tomas. I tried this way, but then I get this error: > > > > > > NoMethodError in UserInf

Re: [Rails] has_one relation and form_for

2012-11-05 Thread Tommaso Visconti
Jean ha scritto: Thanks Tomas. I tried this way, but then I get this error: NoMethodError in UserInformationsController#new undefined method `build' for nil:NilClass yeah, sorry, for has_one relation the correct statement is: def new @user = User.find(params[:id]) @user_information

Re: [Rails] has_one relation and form_for

2012-11-05 Thread Jean
Thanks Tomas. I tried this way, but then I get this error: NoMethodError in UserInformationsController#new undefined method `build' for nil:NilClass On Monday, November 5, 2012 4:55:43 PM UTC-4:30, Tommaso Visconti wrote: > > Jean ha scritto: > > Can't mass-assign protected attributes: user_id

[Rails] Cuban Rails community

2012-11-05 Thread Adrian Perez
I've just started a new discussion group involving Rails developers from Cuba. If you fit that criteria we have open registration at https://groups.google.com/forum/?fromgroups#!forum/cubans-on-rails. If you know of another RUG or Rails group in Cuba that I'm not aware of, please let me know. --

Re: [Rails] has_one relation and form_for

2012-11-05 Thread Tommaso Visconti
Jean ha scritto: Can't mass-assign protected attributes: user_id to solve this you need: attr_accessible :user_id in the UserInformation model, but you're using nested resources, so I'd prefer something like: # UserInformationController # def new @user = User.find(params[:id]) @user_i

[Rails] has_one relation and form_for

2012-11-05 Thread Jean
Hello everybody. I have two models user and user_information. the User has_one user_information and the UserInformation belongs_to user. Now I need to make a form_for to create the user information for an user. So I go to the following link: http://localhost:3000/users/1/user_informations/new a

[Rails] Re: custom validation method on nested model

2012-11-05 Thread Benny
Never mind I figured this out. On Friday, November 2, 2012 12:26:41 PM UTC-4, Benny wrote: > > I can't get the field_with_errors div's to wrap around nested fields in a > fields_for block when using a custom validation method in the parent model. > e.g. there needs to be at least one order detai

[Rails] DragonFly Object not found in Production

2012-11-05 Thread enrico stano
could please anyone help me with this issue? http://stackoverflow.com/questions/13237954/object-not-found-in-production thanks, enrico -- · Enrico Stano · · twitter @enricostano · skype ocirneonats -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

Re: [Rails] Adding associations without commiting to database

2012-11-05 Thread Valery Kvon
RTFS, and use backdoors :) Post.first.tags.target << Tag.first On 02.11.2012, at 19:36, Jan Brdo wrote: > I think there is a slight inconsistency in Rails regarding adding > associations between existing records. > > Assume Post has_many :tags. > > We have an analogy when we want to immedi

Re: [Rails] Wierd NomethodError

2012-11-05 Thread Valery Kvon
get instance variable @output, and when its nil assigns an object Output.new On 05.11.2012, at 18:49, roelof wrote: > > > Op maandag 5 november 2012 15:34:05 UTC+1 schreef addagger het volgende: > when you call @output.messages.should include (message) > @output is nil > > call (@output ||= Ou

Re: [Rails] Wierd NomethodError

2012-11-05 Thread roelof
Op maandag 5 november 2012 15:34:05 UTC+1 schreef addagger het volgende: > > when you call @output.messages.should include (message) > @output is nil > > call (@output ||= Output.new).messages.should include (message) > > That worked but can you explain what this does ? Roelof > > > On 05.1

Re: [Rails] Not able to create test database for cucumber in postgres?

2012-11-05 Thread Walter Lee Davis
On Nov 5, 2012, at 9:11 AM, Fahim Patel wrote: > Hi all, > > > I create "app_test" database in postgres with my accurate owner name. > and when i fire rake db:test:prepare i am getting error :- > > NOTICE: database "app_test" does not exist, skipping > PG::Error: ERROR: permission denied t

Re: [Rails] Wierd NomethodError

2012-11-05 Thread Valery Kvon
when you call @output.messages.should include (message) @output is nil call (@output ||= Output.new).messages.should include (message) On 05.11.2012, at 10:40, roelof wrote: > Hello, > > Im initializing that file here : > > def output > @output ||= Output.new > end > > in the class Outpu

Re: [Rails] multiple language application

2012-11-05 Thread Valery Kvon
Just right now I'm solving definitely this kind of task. I choose an approach where each content having to be translated, is String or Text. Then I created two STI+polymorphic tables (models): MetaText and MetaString. Each of them has columns "value" and "locale" to specify language. class Meta

[Rails] Not able to create test database for cucumber in postgres?

2012-11-05 Thread Fahim Patel
Hi all, I create "app_test" database in postgres with my accurate owner name. and when i fire rake db:test:prepare i am getting error :- NOTICE: database "app_test" does not exist, skipping PG::Error: ERROR: permission denied to create database : CREATE DATABASE "app_test" ENCODING = 'utf8'

Re: [Rails] last saved record not retrieving .

2012-11-05 Thread Fahim Patel
On Monday, November 5, 2012 7:00:53 PM UTC+5:30, Fahim Patel wrote: > > > I try to use sleep in index action controller before and after , but it > also not work. > One thing i notice is that after some time or , restart server all > acurate object come on > index page. > After some time mea

Re: [Rails] last saved record not retrieving .

2012-11-05 Thread Fahim Patel
I try to use sleep in index action controller before and after , but it also not work. One thing i notice is that after some time or restart server when,refresh the page, all acurate object come on index page. But not after creation ? On Monday, November 5, 2012 6:56:05 PM UTC+5:30, Colin La

Re: [Rails] last saved record not retrieving .

2012-11-05 Thread Colin Law
On 5 November 2012 12:54, Fahim Patel wrote: > ... All that looks ok to me, I am out of ideas. Anyone else? 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@googlegroups.com.

Re: [Rails] last saved record not retrieving .

2012-11-05 Thread Fahim Patel
On Monday, November 5, 2012 1:22:32 PM UTC+5:30, Colin Law wrote: > > On 5 November 2012 06:54, Fahim Patel > > wrote: > > > > > > On Saturday, November 3, 2012 7:05:47 PM UTC+5:30, Fahim Patel wrote: > >> > >> > >> > >> On Saturday, November 3, 2012 7:00:23 PM UTC+5:30, Colin Law wrote:

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Carlos Mathiasen
I don't know. When your changes aren't seen in the browser lol Matt's On Mon, Nov 5, 2012 at 8:18 AM, Fahim Patel wrote: > > Thanks for reply . > Is there is any authenticated list of situation in which we have to > restart server ? > > On Monday, November 5, 2012 4:45:49 PM UTC+5:30, Carlos M

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Fahim Patel
Thanks for reply . Is there is any authenticated list of situation in which we have to restart server ? On Monday, November 5, 2012 4:45:49 PM UTC+5:30, Carlos Mathiasen wrote: > > I need restart server when I changed files in lib directory too. Cause I > loaded libs on application.rb. > > Matt

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Carlos Mathiasen
I need restart server when I changed files in lib directory too. Cause I loaded libs on application.rb. Matt's -- 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 uns

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Norbert Melzer
The Gemfile is one that comes to my mind instantly, but aside config/ that's the only one I remember. There could possibly be more that I'm not aware of. Am 05.11.2012 12:02 schrieb "Fahim Patel" : > > > On Monday, November 5, 2012 4:26:04 PM UTC+5:30, Norbert Melzer wrote: >> >> Any change in con

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Fahim Patel
On Monday, November 5, 2012 4:26:04 PM UTC+5:30, Norbert Melzer wrote: > > Any change in config directory requires you to restart the server, but > that should not be a big deal. > > About your second question, I don't understand what you want to ask. > Thanks for reply. As per you say any cha

Re: [Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Norbert Melzer
Any change in config directory requires you to restart the server, but that should not be a big deal. About your second question, I don't understand what you want to ask. Am 05.11.2012 11:47 schrieb "Fahim Patel" : > Hi all, > > Is we have to restart the server when we do any changes in environme

[Rails] Is we have to restart the server(development) when we do any changes in environment.rb ?

2012-11-05 Thread Fahim Patel
Hi all, Is we have to restart the server when we do any changes in environment.rb ? May i know in which file if we make changes than we have to restart the server (development)? Thanks Regards Fahim Babar Patel -- You received this message because you are subscribed to the Google Groups "

[Rails] scaffold: yml files for tests are missing

2012-11-05 Thread Soichi Ishida
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin10.8.0] rails 3.1.3 Probably it is my misunderstanding but doesn't scaffold generate test/fixtures/model_name.yml file automatically? Normally I use scaffold for creating many models, but test/fixtures folder is empty. Not mention I have ce

[Rails] Re: Suggestion for Rails 4

2012-11-05 Thread Abram
Matt, I appreciate your answer... a good explanation :) I'll drop it now Abram On Monday, November 5, 2012 12:54:35 PM UTC+13, Matt Jones wrote: > > > > On Sunday, 4 November 2012 03:38:56 UTC-5, Abram wrote: >> >> Jim, Thanks for that. >> >> What I mean is I want small and large black produc