[Rails] Very strange problem with Gettext and Haml / rake updatepo

2009-08-05 Thread Olaf S.
Hi, I'm on Rails 2.3.3 and using Haml 2.0.9 for my templates and Gettext-Rails 2.0.4 for the translation. Haml works like a charm and gettext is also working like it should. But I cant get Gettext to parse Haml Files when using rake updatepo. I created a custom parser like this: #

[Rails] What’s faster for getting Mails into Rails: Pop vs. MySQL

2009-05-13 Thread Olaf S.
Hi, Suppose I wanted to get mails from my mailserver (different machine) into my Rails App to process it there, what is faster: * Connecting via net/Pop or net/imap to download the mails * Storing the Mails on the Mailserver in a MySQL Database (using something like DBMail) and then connecting

[Rails] Re: Updtade 2.2.2 to 2.3.2

2009-05-13 Thread Olaf S.
Fresh Mix wrote: How can I updated my rails 2.2.2 project to 2.3.2? Chane RAILS_GEM_VERSION = '2.3.2' and ??? How about updating your rails gem first # gem rails update Then maybe freeze it Appdir # rake rails:freeze:edge RELEASE=2.3.2 And of course change your enviroment.rb as you

[Rails] Default value for scope in multi-account App, best way

2009-04-27 Thread Olaf S.
Hi, I'm working on a multi-user, multi-account App where 1 account can have n users. It is very important that every user can only access info from its account. My approach is to add an account_id to every model in the DB and than add a filter in every controller to only select objects with the

[Rails] Re: Default value for scope in multi-account App, best way

2009-04-27 Thread Olaf S.
I know, I know, if you access Session-variables or Instance variables in your Model you didn't understand the MVC pattern and should go back to PHP. But still, this could be very useful if you have - like us - a lot of controllers and actions where you don't always want to write

[Rails] Re: Default value for scope in multi-account App, best way

2009-04-27 Thread Olaf S.
Sorry, it has to be #/lib/ar_current_account.rb ActiveRecord::Base.class_eval do def self.current_account Thread.current[:account] end end of course! -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this

[Rails] Nested params issue with Rack 1.0 / Unable to freeze Rails

2009-04-20 Thread Olaf S.
Hi, I have a very strange issue. I upgraded my Application to Rails 2.3.2 without any problems, then freezed it to vendor/rails and worked through all my specs after I also upgraded Rspec to 1.2.4. At some point (I cannot exactly tell you when) nested parameters didn't work anymore. That means

[Rails] Re: Nested params issue with Rack 1.0 / Unable to freeze Rails

2009-04-20 Thread Olaf S.
hi, $ sudo rake rails:freeze:edge RELEASE=2.3.2.1 worked now, but the problem still persist. All my forms are broken. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: After updating to Rails 2.3.2 whole enviroment broke. Help!!

2009-04-13 Thread Olaf S.
It only copied the folder vendor/rails/railties and says that my Gem folder isn't writeable, so all the other folders are missing. But when I try to reproduce this behavior everything seems to work, even though I still get some error messages: Do you have any idea what that could mean? My

[Rails] Re: After updating to Rails 2.3.2 whole enviroment broke. Help!!

2009-04-10 Thread Olaf S.
Thank you very much for your help. It was a very stupid mistake and is solved now: After upgrading to rails I removed the /vendor/rails folder, because I freezed rails. Then I've run $ rake rails:freeze:gems to freeze the new version (2.3.2). I forgot that I had to do this as root, so the

[Rails] After updating to Rails 2.3.2 whole enviroment broke. Help!!

2009-04-09 Thread Olaf S.
Hi, I don't know what to do. I upgraded to Rails 2.3.2 (from 2.2.2) and everything worked fine. Then I installed the gem gettext_rails following this manual: http://www.yotabanana.com/hiki/ruby-gettext-rails-migration.html At some point I realised that I cannot start my Application anymore nor