Don't assume we have Rails.env if we have Rails
As referenced in #1739 Just because the `Rails` constant is defined, it doesn't mean we're actually in a Rails app. Since there are people who use Paperclip outside of Rails, and there's no reason we shouldn't be able to run in those situations. This commit checks for `Rails.env` instead of just checking for `Rails` and assuming `Rails.env` works.
Showing
... | @@ -2,7 +2,7 @@ source "https://rubygems.org" | ... | @@ -2,7 +2,7 @@ source "https://rubygems.org" |
gemspec | gemspec | ||
gem 'sqlite3', '1.3.8', :platforms => :ruby | gem 'sqlite3', '~>1.3.8', :platforms => :ruby | ||
gem 'jruby-openssl', :platforms => :jruby | gem 'jruby-openssl', :platforms => :jruby | ||
gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby | gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby | ||
... | ... |
lib/paperclip/rails_environment.rb
0 → 100644
spec/paperclip/rails_environment_spec.rb
0 → 100644
Please
register
or
sign in
to comment