rails generate -p complains about Spring server

89 views
Skip to first unread message

Ronald Fischer

unread,
May 21, 2014, 7:16:28 AM5/21/14
to rubyonra...@googlegroups.com
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:in
`call'

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?

--
Posted via http://www.ruby-forum.com/.

Fab Forestier

unread,
May 21, 2014, 7:27:27 AM5/21/14
to rubyonra...@googlegroups.com
Ronald Fischer 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

Ronald Fischer

unread,
May 21, 2014, 7:55:59 AM5/21/14
to rubyonra...@googlegroups.com
Fab Forestier 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...
Reply all
Reply to author
Forward
0 new messages