New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 5 compatibility #485

Open
elik-ru opened this Issue Jul 7, 2016 · 4 comments

Comments

Projects
None yet
5 participants
@elik-ru
Copy link

elik-ru commented Jul 7, 2016

One nice feature of rails 5 - "rails" utility can execute rake commands. So instead of "rake db:migrate" one can use "rails rb:migrate". But currently spring can't detect this case and those commands pass beside spring.

I'm using spring 1.7.2 and rails 5.0.0.rc2

@swrobel

This comment has been minimized.

Copy link

swrobel commented Feb 21, 2017

This is still an issue with Spring 2.0.1 & Rails 5.0.1 which is pretty disappointing considering we're supposed to use rails instead of rake now.

$ bin/spring binstub rails # Just to be sure
* bin/rails: spring already present

$ bin/spring status
Spring is not running.

$ bin/rails routes
Prefix Verb URI Pattern          Controller#Action
  root GET  /                    spots#index

$ bin/spring status
Spring is not running.

$ bin/rake routes
Running via Spring preloader in process 43483
Prefix Verb URI Pattern          Controller#Action
  root GET  /                    spots#index
@jonleighton

This comment has been minimized.

Copy link
Member

jonleighton commented Feb 21, 2017

Yes, it would be great if somebody could work on a PR

@baileyparker

This comment has been minimized.

Copy link

baileyparker commented Jul 20, 2017

It seems like the example presented by @swrobel still holds. I'm not sure if this was also the case back in February, but as of 5.1.2 bin/rails g does invoke the spring preloader.

@igbanam

This comment has been minimized.

Copy link

igbanam commented Oct 15, 2017

I am currently on rails 5.1.4 and spring 2.0.2; doesn't seem to me that spring loads up. I think it's related to this issue because on other version of rails, spring seems to be fine. Here's my dump

^C~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `gets': Interrupt
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/run.rb:117:in `verify_server_version'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/run.rb:62:in `run'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/run.rb:42:in `warm_run'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/run.rb:35:in `call'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/rails.rb:24:in `call'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
	from ~/.rvm/gems/ruby-2.4.0@rails5/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
	from ~/Projects/ruby/rails/bucketer/bin/spring:16:in `require'
	from ~/Projects/ruby/rails/bucketer/bin/spring:16:in `<top (required)>'
	from bin/rails:5:in `load'
	from bin/rails:5:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment