Issue with ActiveRecord 4.2 in non Rails app

53 views
Skip to first unread message

Giedrius Rimkus

unread,
Feb 16, 2015, 8:30:17 AM2/16/15
to rubyonra...@googlegroups.com
Hello,

I've been using ActiveRecord and ActionMailer outside Rails.
Versions: 4.1.7

Recently wanted to update to 4.2.0 and got an issue:

NoMethodError: undefined method `env' for Rails:Module
/Users/user/.rvm/gems/ruby-2.1.2/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:3:in `block in <module:ConnectionHandling>'

I've also commented in the commit, so you can have a look for more info there.


Any ideas on how to solve it?

Thank you!

Giedrius

Giedrius Rimkus

unread,
Mar 5, 2015, 1:37:27 PM3/5/15
to rubyonra...@googlegroups.com
No one else is having issues with migrations in non rails apps?

Robby O'Connor

unread,
Mar 5, 2015, 1:41:27 PM3/5/15
to rubyonra...@googlegroups.com

http://recipes.sinatrarb.com/p/models/active_record

--Rob
Sent from my cell, please excuse any typos.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/55c849e5-0b13-47de-baa4-2f70fd7434ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frederick Cheung

unread,
Mar 5, 2015, 5:04:19 PM3/5/15
to rubyonra...@googlegroups.com

I've also commented in the commit, so you can have a look for more info there.



Given that it is apparently fixed on 4-2 stable, have you tried one of the 4.2.1 release candidates?

Fred

Giedrius Rimkus

unread,
Mar 6, 2015, 8:08:40 AM3/6/15
to rubyonra...@googlegroups.com
Hi Fred,

Thanks. Apparently it has been fixed in this release, because migrations now work in 4.2.1rc3, though I couldn't find specific bugfix commit.
Reply all
Reply to author
Forward
0 new messages