[Rails] Trouble installing mysql gem

2008-12-22 Thread Bryce Roney
Hello, I'm having trouble installing the mysql gem, here is the error I am getting: Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

[Rails] Re: mySQL databases and Radiant...uggg

2008-12-21 Thread Bryce Roney
> > mysql> grant all on radiant_cms_development.* to root@'%' identified by > 'root'; > ERROR 1044 (42000): Access denied for user ''@'localhost' to database > 'radiant_cms_development' Does the user you are using to issue this command have appropriate permissions to GRANT permissions to others?

[Rails] Re: upload image

2008-12-19 Thread Bryce Roney
You could try Paperclip: http://www.thoughtbot.com/projects/paperclip On 20/12/2008, at 4:07 PM, Johny ben wrote: > > anyone have a code that upload image > -- > Posted via http://www.ruby-forum.com/. > > > --~--~-~--~~~---~--~~ You received this message becau

[Rails] Re: undefined method `stories_path'

2008-12-19 Thread Bryce Roney
Glad to help. I assume you're following the SitePoint Rails book? It's a good one – it helped me learn Rails when I was starting out (I got the free copy for Rails 2.1) -- Bryce Roney On 20/12/2008, at 3:36 PM, Merrick Johnson wrote: > > Bryce Roney wrote: >> Is

[Rails] Re: undefined method `stories_path'

2008-12-19 Thread Bryce Roney
Is your config/routes.rb properly set up? -- Bryce Roney On 20/12/2008, at 3:27 PM, Merrick Johnson wrote: > > Hi, > > I recieve error "undefined method `stories_path' for > #" when going to the view via > site.com/stories/new > > The model is setup cor

[Rails] Re: Is rails for me?

2008-12-18 Thread Bryce Roney
Django is configuration over convention framework, i.e you tell django where everything is and where to find it. Rails is convention over configuration, i.e there are specified places to put your controllers, models and views, there are specified naming conventions and methods to use. So if

[Rails] Re: help with counter_cache

2008-12-18 Thread Bryce Roney
Oh sorry! I was copying the code out of a project I had. change s.items.count to u.items.count -- Bryce Roney On 19/12/2008, at 12:13 PM, Scott Kulik wrote: > > Bryce Roney wrote: >> You can run a migration like this >> >> def self.up >> User.find(:all) do

[Rails] Re: help with counter_cache

2008-12-18 Thread Bryce Roney
You can run a migration like this def self.up User.find(:all) do |u| u.update_attribute :items_count, s.items.count end end That will go through all your users and update the items_count field for all of them. ~~~ Bryce Roney [ twitter ][ blog ][ myspace ][ facebook