Rails generate -p complains about Spring server

Rails 4.1.1, Ruby 2.1.1, OSX 10.6

This works:

rails generate model Word repr:string level:integer atari:integer
triple:references

This does not:

rails generate model -p Word repr:string level:integer atari:integer
triple:references

It raises the error message:

…/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/run.rb:73:in
connect_to_application': Error connecting to Spring server (RuntimeError) from /Users/fusshuhn/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/run.rb:30:incall’

From my understanding (as of ‘rails generate model -h’), the purpose of
-p is to just show which changes would be done, without actually
changing anything (i.e. doing a dry run), so I’m surprised to get this
error. What does the error mean, and why do I get it?

Ronald F. wrote in post #1146690:

Rails 4.1.1, Ruby 2.1.1, OSX 10.6

This works:

rails generate model Word repr:string level:integer atari:integer
triple:references

This does not:

rails generate model -p Word repr:string level:integer atari:integer
triple:references

It raises the error message:

…/ruby-2.1.1/gems/spring-1.1.3/lib/spring/client/run.rb:73:in
`connect_to_application’: Error connecting to Spring server
(RuntimeError)
from
If you take a look in the helper ( rails generate model -h) the options
are after attributes of your model like this rails generate model Word
repr:string level:integer atari:integer triple:references -p

Fab F. wrote in post #1146691:

If you take a look in the helper ( rails generate model -h) the options
are after attributes of your model like this rails generate model Word
repr:string level:integer atari:integer triple:references -p

Thanks so much! Now it’s obvious…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs