[Rails] Ruby on rails. How to format errors.full_messages?

2012-11-10 Thread Akvarel
I have such validation structures: validates :upload_file_name, :presence = true, :format ={:with = %r{\.(jpg)$}i,:message =should have an extension .jpg} validates_uniqueness_of :upload_file_name, :message =

[Rails] gem install fails so no installation of Rails

2012-11-10 Thread Tommy Pollák
On Ubuntu 12.04 trying to install Rails with $ gem install Rails fails with ERROR: Loading command: install (LoadError) cannot load such file -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand Ruby was installed with rbenv. More info:

[Rails] Re: gem install fails so no installation of Rails

2012-11-10 Thread Sam Pizzey
Pardon the silly question, but are you sure zlib1g-dev was installed prior to building this ruby and not after the fact? (This has caused many the annoying hour for me with multiple rubies and forgetting when ruby x was actually built!) -- You received this message because you are subscribed

Re: [Rails] Hosting costs for a small up!

2012-11-10 Thread Mohamed Wael Khobalatte
Thank you so much Paul. These are awesome resources. On Fri, Nov 9, 2012 at 8:56 PM, Paul Makepeace pa...@paulm.com wrote: Take a look at Amazon EC2 esp. since they make considerations for those involved in education, http://aws.amazon.com/education/ Even if you're not in education they

[Rails] How to get database schema version manually?

2012-11-10 Thread Dmitry Vakulenko
Hello! I try to make automatic migrations directly from ruby script without using rake and console commands. But I can't retrieve current database schema version. I have tried to use ActiveRecord::Migration.version and @version property in a child of ActiveRecord::Migration. The result was nil

[Rails] Re: How to get database schema version manually?

2012-11-10 Thread Dmitry Vakulenko
I have found the solution, but only by looking source code of activerecord gem. It's simple :) ActiveRecord::Migrator.current_version -- 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 post to

[Rails] Re: gem install fails so no installation of Rails

2012-11-10 Thread Tommy Pollák
No, the question is not silly at all. Actually, when I presented this problem in an Ubuntu forum I asked it myself. And, yes, uninstalling and reinstalling ruby 1.9.3-p286 solved the problem. Thank you very much! Den lördagen den 10:e november 2012 kl. 17:00:21 UTC+1 skrev Sam Pizzey: Pardon

[Rails] Re: Hosting costs for a small up!

2012-11-10 Thread Matt Jones
On Friday, 9 November 2012 12:57:53 UTC-5, why-el wrote: Hey friends! I am in the process of drafting a funding proposal to submit to my university and I have no idea what costs I should include for my Rails app. My application will open to my university's students. We are about 1600

Re: [Rails] Re: Hosting costs for a small up!

2012-11-10 Thread Jordon Bedwell
On Sat, Nov 10, 2012 at 6:02 PM, Matt Jones al2o...@gmail.com wrote: Costs can go up pretty quick on Heroku, but your application doesn't sound like it would need a whole lot of resources. If nothing else, starting out on the free plans on Heroku will provide you with a better understanding of

[Rails] help for ideas of instance method or controller

2012-11-10 Thread Soichi Ishida
I have a general question about Rails controller or instance method. Say, I have two models, Give Take Each of these has an identical set of columns like, Give : weight:integer, day:date Take: weight:integer, day:date When @give = Give.new is created, I want to search if there is a