Skip to content

A platform for community discussion. Free, open, simple.

Don't look for the only argument, but the first one

Robin Wardcc90ed38704a
diff --git a/bin/rails b/bin/rails
index 6ce45ce44f8..d7b24fe7edd 100755
--- a/bin/rails
+++ b/bin/rails
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-if !ENV["RAILS_ENV"] && (ARGV == ["s"] || ARGV == ["server"])
+if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
ENV["UNICORN_PORT"] = "3000"
exec File.expand_path("unicorn", __dir__)
end