3

I'm running a ruby on rails app

Rails 3.1.3 ruby 1.9.3p0

I'm trying to get my database running and I get an FATAL error when I run rake db:migrate

rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
[FATAL] failed to allocate memory

And I also get it when I run rails s

rails s
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[FATAL] failed to allocate memory

With a --trace I get this

rails s --trace
/Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands/server.rb:33:in `parse!': invalid option: --trace (OptionParser::InvalidOption)
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:280:in `parse_options'
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/server.rb:180:in `options'
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands/server.rb:54:in `set_environment'
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands/server.rb:42:in `initialize'
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `new'
    from /Users/developer/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Any Clue whats join on? I've done a few searches, and this looks to be the closest but following their method of switching mysql didn't help.

Community
  • 1
  • 1
mediarts
  • 1,511
  • 4
  • 18
  • 29
  • Where did you get the Ruby? You are on Mac OSX? I had issues with stock CentOS Rubies, but nothing after I compiled my own. – Amala Mar 29 '12 at 23:49

1 Answers1

-1

My guess is that you need to remove the "kitchen sink". Pare down the list of gems to only what is required for the application to operate properly. Otherwise consider adding more memory.

RecentCoin
  • 316
  • 3
  • 5