rubyonrailsin

A Ruby and Rails talk

Saturday, March 13, 2010


[Rails] Re: "We're sorry, but something went wrong." from RoR app

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I've got the entire application back to where I was before I thought
upgrading MySQL might be the solution to my problem.

The problem was that I added an expense item which included an amount,
say 10.50. After saving the new item, the expense amount displayed
as simply 10 -- no .50 anywhere. I finally realized my problem was
scale=0 for my amount column.

I generated/edited this migration to fix my problem. Do you think it
will work if I use rake to apply it?

class ChangeExpenseTblAmountCol < ActiveRecord::Migration
def self.up
class Expense
change_column :amount, decimal :precision=>10, scale=>2
end
end

def self.down
end
end

Or should I have simply changed the class name (which is simply the
name I gave to the generator).
I'm running Rails 2.3.5, Ruby 1.8.6 and MySQL 5.0.37-community-nt


On Mar 13, 2:27 am, kannav rajeev <rajeevsharm...@gmail.com> wrote:
> Check out yours database and table is they are fine ?
> and if possible rebuilt app
> or
> reconfigure database.yml
>
> thanks its about database connectivity issue i think
>
> --
>
> Thanks:
> Rajeev sharma

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive