diff --git a/Rakefile b/Rakefile index 25bd8aea0..7e5e8eed3 100755 --- a/Rakefile +++ b/Rakefile @@ -3,6 +3,6 @@ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require 'rake/dsl_definition' -require File.expand_path('config/application', __dir__) +require File.expand_path('../config/application', __FILE__) Growstuff::Application.load_tasks diff --git a/config/application.rb b/config/application.rb index 9b11cc2a8..ae8d6e95f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('boot', __dir__) +require File.expand_path('../boot', __FILE__) require 'rails/all' require 'openssl' diff --git a/config/boot.rb b/config/boot.rb index 24efefdb2..f2830ae31 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,6 +1,6 @@ require 'rubygems' # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/config/environment.rb b/config/environment.rb index b72677751..b175f6a30 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the rails application -require File.expand_path('application', __dir__) +require File.expand_path('../application', __FILE__) # Initialize the rails application Growstuff::Application.initialize! diff --git a/script/rails b/script/rails index 754b05caa..9092f9f3c 100755 --- a/script/rails +++ b/script/rails @@ -2,6 +2,6 @@ # This command will automatically be run when you run "rails" # with Rails 3 gems installed from the root of your application. -APP_PATH = File.expand_path('../config/application', __dir__) -require File.expand_path('../config/boot', __dir__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 862b0316d..e28dd6e24 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -17,7 +17,7 @@ SimpleCov.start :rails do end require 'spec_helper' -require File.expand_path('../config/environment', __dir__) +require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! Rails.application.eager_load!