Reputation: 1
I am new to Rails and I'm having trouble just starting. I consistently get an error that a fork failed due to allocation problems. This is the code:
root@shotgunrides:/home/rails/rails_project# rails g model post email:string
/usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application.rb:156:in `fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application.rb:156:in `serve'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application.rb:131:in `block in run'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application.rb:125:in `loop'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application.rb:125:in `run'
from /usr/local/rvm/gems/ruby-2.2.1/gems/spring-1.6.2/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Upvotes: 0
Views: 385
Reputation:
Typically, when you see ENOMEM
it means your system does not have enough memory available to accomplish whatever it was you were attempting to do. In this case it looks like your system doesn't have enough memory to handle your rails
command, and just explodes.
If you could post some system specs that would be helpful, but killing running processes is pretty much the solution (aside from just adding more RAM).
Upvotes: 1