rails-spring

Spring and middleware conflict?

半世苍凉 提交于 2020-01-29 09:48:28
问题 I'm trying to add oauth2 with Google, following these instructions. I'm receiving the following error message starting the server: Exiting You've tried to invoke Spring when it's already loaded (i.e. the Spring constant is defined). This is probably because you generated binstubs with Spring 1.0, and you now have a Spring version > 1.0 on your system. To solve this, upgrade your bundle to the latest Spring version and then run `bundle exec spring binstub --all` to regenerate your binstubs.

How to set class level variables in Rails initializer when using spring?

别来无恙 提交于 2020-01-24 23:47:56
问题 In my config/initializers/transaction_logger.rb I have the following code # config/initializers/transaction_logger.rb Transaction::Logger.logger = Transaction::Logger.new("log/transations.log") Every time I change the code and run the tests I get: Failure/Error: delegate :info, :warn, :debug, :error, to: :logger Module::DelegationError: #<Class:Transaction::Logger>#error delegated to logger.error, but logger is nil: Transaction::Logger I have to run spring stop and then re-run the test again

Rails generate error: No such file or directory - getcwd

牧云@^-^@ 提交于 2019-12-18 19:38:10
问题 When running rails generate on a new Rails 4.2 project, I keep getting the error: ~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.3.0/lib/spring/configuration.rb:37:in `pwd': No such file or directory - getcwd (Errno::ENOENT) How can I fix this? 回答1: The error is caused by an existing Rails Spring process running in the background. You can easily solve this by running ps ax | grep spring to find the process id and then kill it. There's an issue on the Rails GitHub about this: https:

Rails generate error: No such file or directory - getcwd

牧云@^-^@ 提交于 2019-12-18 19:38:07
问题 When running rails generate on a new Rails 4.2 project, I keep getting the error: ~/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/spring-1.3.0/lib/spring/configuration.rb:37:in `pwd': No such file or directory - getcwd (Errno::ENOENT) How can I fix this? 回答1: The error is caused by an existing Rails Spring process running in the background. You can easily solve this by running ps ax | grep spring to find the process id and then kill it. There's an issue on the Rails GitHub about this: https:

Dockerized Rails 5 RC1 application not picking up updates to controllers and models in development

[亡魂溺海] 提交于 2019-12-04 18:42:11
问题 I have quite a bit of experience developing Rails 4 apps on Mac OS X + Docker Machine + Docker Compose, but something has changed with how Rails 5 is caching files in the development environment (currently testing with RC1). After starting the application with docker-compose up , the application runs normally in development mode. But if I make a change to a controller or model, the only way I can get that reflected in the application is to stop the server and start it back up. So now my