[Rails] Re: embedded ruby in database.yml config file

2015-04-19 Thread Stuart Fraser
So I worked out that Spring was my problem. If the ENV['DATABASE_URL'] or any other setting is not set then Spring still starts and keeps running with things unset. I lost far too much time wondering why I could see my ENV variables in Rails Console but database.yml wasn't getting set. spring

[Rails] Solve my problem, please

2015-04-19 Thread Andika Andika Nugraha
I can't start Attachments: http://www.ruby-forum.com/attachment/10718/tets.jpg -- 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 unsubscribe from this group and stop receiving emails from it,

Re: [Rails] Templates

2015-04-19 Thread Colin Law
On 18 April 2015 at 18:13, Augusto MNA wrote: > How yours put an variable of database in header.erb and include the > header.erb file in the template? Start by working right through a good tutorial such as railstutorial.org (which is free to use online). That will show you the basics of rails.

Re: [Rails] Accessing attributes of one table from different model (which is related to another table)

2015-04-19 Thread Colin Law
On 19 April 2015 at 08:14, Padmahas Bn wrote: > Hello all, I referred the rails guides from documentation section, but I > cannot solve this problem. > > Problem: > 1. I have member and receipt model (which should have corresponding members > and receipts table). > 2. Now I created a model called

[Rails] Rescuing ActiveRecord errors without logging

2015-04-19 Thread Inba
Hi, I have the following piece of code: begin DummyModel.create(record) rescue if $!.class == ActiveRecord::StatementInvalid and $!.to_s['PG::CharacterNotInRepertoire'] Logger.info("Issues with encoding for #{record[:email_domain]}. Attempting encoding") DummyModel.create(Utils.encode_record_

[Rails] Templates

2015-04-19 Thread Augusto MNA
How yours put an variable of database in header.erb and include the header.erb file in the template? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to ruby

[Rails] Accessing attributes of one table from different model (which is related to another table)

2015-04-19 Thread Padmahas Bn
Hello all, I referred the rails guides from documentation section, but I cannot solve this problem. Problem: 1. I have member and receipt model (which should have corresponding members and receipts table). 2. Now I created a model called recovery to write some business logic. (logic must be in

Re: [Rails] RVM question

2015-04-19 Thread Norbert Melzer
rvm use version@gemset Am 19.04.2015 03:06 schrieb "jmcguckin" : > I have a bit of a chicken & egg problem: > > Assume I have a top level directory for all my Rails projects. Each > project might be using a different version of Ruby and Rails. > > How do I run a "rails new foo" with the correct ru