Login 1 error prohibited this {{model}} from being saved
There were problems with the following fields:
this is the view code
<h1>Login</h1>
<% form_for @user_session, :url => user_session_path do |f| %>
<%= f.error_messages %>
<%= f.label :login %><br />
<%= f.text_field :login %><br />
<br />
<%= f.label :password %><br />
<%= f.password_field :password %><br />
<br />
<%= f.check_box :remember_me %><%= f.label :remember_me %><br />
<br />
<%= f.submit "Login" %>
<% end %>
` its odd and it shows up on in the time_ago_in_words method when the out put is in months
just kinda started doing this randomly, anybody seen this before?
Yes, it happens when the version of Ruby has been upgraded to a version that is not supported by your version of Rails. Older version of rails uses a syntax that is not supported by newer versions of Ruby.
To solve it, you should either upgrade Rails or downgrade Ruby.
Rails 2.3.9 should be sufficient.
http://weblog.rubyonrails.org/2010/9/4/ruby-on-rails-2-3-9-released
the i18n gem needs to correspond to the version of RUBY and RAILS that you're running ...
changelog for i18n. http://blog.plataformatec.com.br/2010/02/rails-3-i18n-changes/
running
gem uninstall i18n
then
gem install i18n -v 0.4.0
should solve any issues you've got with rails 2.3.8 and the double curly bracket error messages
You can also run into this if you install the i18n gem. I had installed metrical, and one of its dependencies is the i18n gem. This caused the same error as above. Once I removed the gem, I started seeing the correct messages again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With