Comments (3)
@mildred Can I ask a question? Do you think this would cause this problem I am facing since upgrading Spring from 2.1.1. I have the following command:
bin/rails db:drop RAILS_ENV=test DATABASE_URL=test_lib
Since upgrading Spring, the DATABASE_URL env variable is being ignored. Just wondering if I need to report a new issue or is this the same issue.
from spring.
I'm having a similar issue with MYSQL_SOCKET
being ignored, even though I can see it is set after Spring forks.
Running via Spring preloader in process 41869
ENV['MYSQL_SOCKET']: "/tmp/mysql.sock"
An error occurred while loading ./spec/jobs/my_job_spec.rb.
Failure/Error: ActiveRecord::Migration.maintain_test_schema!
ActiveRecord::ConnectionNotEstablished:
Can't connect to local MySQL server through socket '' (2)
# ./spec/support/config/migrations.rb:3:in `<top (required)>'
# ./spec/rails_helper.rb:18:in `<top (required)>'
# ./spec/jobs/my_job_spec.rb:1:in `<top (required)>'
# -e:1:in `<main>'
# ------------------
# --- Caused by: ---
# Mysql2::Error::ConnectionError:
# Can't connect to local MySQL server through socket '' (2)
where the file spec/support/config/migrations.rb
looks like:
puts "ENV['MYSQL_SOCKET']: #{ENV['MYSQL_SOCKET'].inspect}"
# Ensure that all migrations have been run before running specs
ActiveRecord::Migration.maintain_test_schema!
I'm not sure how this is possible. The ENV variables are set and managed by direnv
in an .envrc
file.
I'm on Rails 7.0.7.2 and spring 4.1.1
from spring.
For me it was a case of two different spring processes running. One in the foreground in my terminal, which worked, and responded to commands also sent from the terminal, and the other was running hidden in RubyMine, and it had not been restarted when I was manually restarting the one in my Terminal.
See: https://www.jetbrains.com/help/ruby/spring.html#stop_spring
from spring.
Related Issues (20)
- Freebsd terminal detach minor problem
- Processes just hang with Spring 4.0 HOT 10
- 3.1.1 started breaking with getpid or cache_classes HOT 12
- NoMethodError when invoking `rails` command without arguments (undefined method `start_with?' for nil:NilClass)
- Unable to start rails console HOT 5
- `Bundler.with_original_env` vs `Bundler.with_unbundled_env` HOT 6
- Periodically auto restart HOT 5
- spring 4.0.0 bundles with rails < 6.0 HOT 1
- spring 4.0.0 gets hanged with rails 6.1 HOT 2
- Different exit code for SIGKILL'ed processes with Spring
- Bundler::GemNotFound when starting running `rails` commands when Gemfile has changed dependencies HOT 4
- `rails db:system:change` command fails via spring HOT 2
- Cut new gem to include latest fix to `digest` HOT 1
- Unable to Ctrl C out of errored rails console
- Server leaks memory HOT 2
- spring binstub modifier does not check for class presence HOT 1
- spring binstub causes Gem::LoadError after bundle update default gem with ext
- Mac forking error HOT 1
- Spring 4.2.0 crashing when running rake
- Bug: undefined method `hide_cursor' for Reline::GeneralIO:Class (NoMethodError)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring.