Re: [Rails] Re: StatementInvalid error when adding a tagging system to a blog

2014-02-17 Thread Nadia Vu
Yep. All fixed now. I checked for the columns like you asked. And I found out that the typo/pluralization in the Taggings.rb file named the column wrong ie: belongs_to :posts made the column name posts_id as opposed to post_id after fixing the typo, I rolled back the migration, and ran the migr

[Rails] How to Test Multimodel Paperclip attachments?

2014-02-17 Thread Patrick Perey
I'm using Rspec and FactoryGirl to create specs for multimodel paperclip attachments. From searching other questions, it seems like a single image attachment is more common. Car.rb class Car < ActiveRecord::Base has_many :uploads, dependent: :destroy validates :uploads, presence:

[Rails] Re: Devise Invitable and Validations -- what's the right way to do this?

2014-02-17 Thread Mikael Kessler
I'm sure you've found a solution or workaround to your problem by now, but for any future group members who encounter the same problem I found a pretty simple fix. Devise Invitable's model configuration docsdon't fully explain

Re: [Rails] Get database filled with data only one time?

2014-02-17 Thread Colin Law
On 17 February 2014 21:38, Luca Fuhl wrote: > Hay guys, im pretty new to rails and im working on my first little > project (well it's a page for a friend so ˆˆ) and until now i got no > problems. But no i got my first little problem and not sure how to solve > it right :s. > > I have a database w

[Rails] Get database filled with data only one time?

2014-02-17 Thread Luca Fuhl
Hay guys, im pretty new to rails and im working on my first little project (well it's a page for a friend so ˆˆ) and until now i got no problems. But no i got my first little problem and not sure how to solve it right :s. I have a database with a table called game_pairs where i want to store game

Re: [Rails] Need help -FATAL: database "catarse_development" does not exist

2014-02-17 Thread Hassan Schroeder
On Mon, Feb 17, 2014 at 1:18 PM, Pop Pop wrote: > i try to run this > rake db:migrate > > How i fix this > [root@localhost catarse]# rake db:migrate > FATAL: database "catarse_development" does not exist Does it not seem pretty apparent that you can't run a migration on a non-existent databa

[Rails] Need help -FATAL: database "catarse_development" does not exist

2014-02-17 Thread Pop Pop
Hi i try to run this rake db:migrate How i fix this i get this [root@localhost catarse]# rake db:migrate /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require': iconv will be deprecated in the future, use String#encode instead.

[Rails] Re: Hi i;m new in Ruby on Rails need same help

2014-02-17 Thread Pop Pop
thanks i have fix that by add turst -- 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, send an email to rubyonrails-talk+unsubscr.

[Rails] Re: RVM group in Terminal

2014-02-17 Thread Michał Papis
open an issue for me here https://github.com/wayneeseguin/rvm/issues -- 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 rubyonrails-talk+unsubscr...@googlegr

[Rails] Looking for ruby on rails mentors

2014-02-17 Thread Ed Roman
I'm looking for expert developers who would like to earn some money and spend a few hours working from home mentoring other developers in Rails. It would be paid work, for fun on the side. This is done via a website I'm launching where developers can mentor other developers in Ruby on Rails via a

Re: [Rails] Hi i;m new in Ruby on Rails need same help

2014-02-17 Thread James Turley
This is, as the error implies, a postgres authentication error. Check that the user postgress exists (possible typo for postgres?), and while you're at it, that it has permission to create and modify databases. If you still get the error, you'll need to switch to another form of authentication. Se

[Rails] Re: CanCan: How to define ability with some conditions

2014-02-17 Thread James Davis, PhD
On Sunday, February 16, 2014 10:57:33 PM UTC-6, Роман Ярыгин wrote: > > Hello everyone! > > I have code: > > if user.role == "topmanager" > can :read, ActiveAdmin::Page, :name => "Dashboard" > can :manage, Realty, agent: {agency_id: user.agency_id} > ... > > And I want to add ano

[Rails] Re: CanCan: How to define ability with some conditions

2014-02-17 Thread James Davis, PhD
On Sunday, February 16, 2014 10:57:33 PM UTC-6, Роман Ярыгин wrote: > > Hello everyone! > > I have code: > > if user.role == "topmanager" > can :read, ActiveAdmin::Page, :name => "Dashboard" > can :manage, Realty, agent: {agency_id: user.agency_id} > ... > > And I want to add ano

[Rails] Re: CanCan: How to define ability with some conditions

2014-02-17 Thread Martin Streicher
So you want to say "The user can manage Realty if the agent has the right agency ID or if the agent is nil"? If so, don't use the hash version of the condition. Go ahead and spell it out. You could also try agent: {agency_id: [nil, user.agency_id] ) -- You received this message because you

Re: [Rails] Update 'strong_parameters' from 0.1.4 to 0.2.3

2014-02-17 Thread Walter Lee Davis
On Feb 16, 2014, at 10:40 PM, Eric Jefcoat wrote: > Hello, > > Can anyone tell me how to upgrade 'strong_parameters' from 0.1.4 to 0.2.3 on > the Terminal? When I use 'update strong_parameters' it tell me that it no > longer uses update. When I say upgrade it says command not found. I am usin

Re: [Rails] Re: StatementInvalid error when adding a tagging system to a blog

2014-02-17 Thread Colin Law
On 17 February 2014 12:13, Nadia Vu wrote: > Hi, thank you for that. > I have made that change. From > > belongs_to :tag > belongs_to :posts > > to > > belongs_to :tag > belongs_to :post > > > > However. I am still getting the same error. > Looking at many similar open stackoverflow answers and qu

[Rails] Hi i;m new in Ruby on Rails need same help

2014-02-17 Thread Pop Pop
Hi i try to run the rake db:migrate [root@localhost catarse]# rake db:migrate You no longer need to have jasmine.rake in your project, as it is now automatically loaded from the Jasmine gem. To silence this warning, set "USE_JASMINE_RAKE=true" in your environment

Re: [Rails] Re: StatementInvalid error when adding a tagging system to a blog

2014-02-17 Thread Nadia Vu
Hi, thank you for that. I have made that change. From belongs_to :tag belongs_to :posts to belongs_to :tag belongs_to :post However. I am still getting the same error. Looking at many similar open stackoverflow answers and questions I honestly thought the pluralization was going to fit it. Bu

[Rails] Re: StatementInvalid error when adding a tagging system to a blog

2014-02-17 Thread Sridhar Vedula
It is belongs_to :post --- not posts On Thursday, 13 February 2014 12:27:48 UTC+5:30, Nadia Vu wrote: > > Hi there, I'm very new to RoR please be kind. > > I wasn't sure where to go but I was hoping I could find help here after > days of hair pulling. Stackoverflow was not successful.