Coder Social home page Coder Social logo

Comments (12)

thiagopradi avatar thiagopradi commented on August 19, 2024

I guess it is. I haven't been using Octopus on production for a year, but the spec suite is green and some people are using it.

from octopus.

austinmills avatar austinmills commented on August 19, 2024

That's a little disturbing to hear from the maintainer... :) Can you elaborate? Are you using something different, or did your needs just change?

from octopus.

rjharmon avatar rjharmon commented on August 19, 2024

@tchandy - ping? @austinmills has a good question and I'm sure others would like to know the answer as well.

from octopus.

thiagopradi avatar thiagopradi commented on August 19, 2024

I know it sounds weird, but right now I don't have a production app using Octopus. I'm not the maintainer of the application that started the requisites for Octopus... But, If I need to setup sharding/replication using ActiveRecord, I will use Octopus for sure.

So, all feedbacks from production apps are welcome :)

Thanks

from octopus.

rrouse avatar rrouse commented on August 19, 2024

I know I'm late to the party, but I'm using Octopus in production at Journatic. We've been running with it for about 8 months now. No real issues.

It actually holds up better than a MySQL Proxy solution we were using before.

from octopus.

xaviershay avatar xaviershay commented on August 19, 2024

Commits to relax the dependency went in directly after v0.4.0, so it's safe to lock to 7e585ec.

Other changes in master look mostly 3.1 and spec related, plus a single performance commit (my commit). New gem release would be nice.

git diff v0.4.0..7e585ecd35d3caf9b5d23a0265e709716740a3ce

diff --git a/Gemfile b/Gemfile
index e82375d..c3bcf77 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
 source :rubygems

-gem 'activerecord', '3.0.6'
-gem 'actionpack', '3.0.6'
+gem 'activerecord', '~> 3.0'
+gem 'actionpack', '~> 3.0'

 group :test do
   gem "rake", ">= 0.8.7"
diff --git a/Gemfile.lock b/Gemfile.lock
index a80476c..a82c18f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -58,8 +58,8 @@ PLATFORMS
   ruby

 DEPENDENCIES
-  actionpack (= 3.0.6)
-  activerecord (= 3.0.6)
+  actionpack (~> 3.0)
+  activerecord (~> 3.0)
   jeweler (>= 1.4)
   mysql2
   pg (>= 0.9.0)
diff --git a/ar-octopus.gemspec b/ar-octopus.gemspec
index 9e5f73e..2b06df4 100644
--- a/ar-octopus.gemspec
+++ b/ar-octopus.gemspec
@@ -171,8 +171,8 @@ Gem::Specification.new do |s|
     s.specification_version = 3

     if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
-      s.add_runtime_dependency(%q<activerecord>, ["= 3.0.6"])
-      s.add_runtime_dependency(%q<actionpack>, ["= 3.0.6"])
+      s.add_runtime_dependency(%q<activerecord>, ["~> 3.0"])
+      s.add_runtime_dependency(%q<actionpack>, ["~> 3.0"])
       s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
       s.add_development_dependency(%q<mysql2>, [">= 0"])
       s.add_development_dependency(%q<pg>, [">= 0.9.0"])
@@ -181,8 +181,8 @@ Gem::Specification.new do |s|
       s.add_development_dependency(%q<actionpack>, [">= 2.3"])
       s.add_runtime_dependency(%q<activerecord>, [">= 2.3"])
     else
-      s.add_dependency(%q<activerecord>, ["= 3.0.6"])
-      s.add_dependency(%q<actionpack>, ["= 3.0.6"])
+      s.add_dependency(%q<activerecord>, ["~> 3.0"])
+      s.add_dependency(%q<actionpack>, ["~> 3.0"])
       s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
       s.add_dependency(%q<mysql2>, [">= 0"])
       s.add_dependency(%q<pg>, [">= 0.9.0"])
@@ -192,8 +192,8 @@ Gem::Specification.new do |s|
       s.add_dependency(%q<activerecord>, [">= 2.3"])
     end
   else
-    s.add_dependency(%q<activerecord>, ["= 3.0.6"])
-    s.add_dependency(%q<actionpack>, ["= 3.0.6"])
+    s.add_dependency(%q<activerecord>, ["~> 3.0"])
+    s.add_dependency(%q<actionpack>, ["~> 3.0"])
     s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
     s.add_dependency(%q<mysql2>, [">= 0"])
     s.add_dependency(%q<pg>, [">= 0.9.0"])
diff --git a/lib/octopus/association_collection.rb b/lib/octopus/association_collection.rb
index 2dbff87..44d0f7a 100644
--- a/lib/octopus/association_collection.rb
+++ b/lib/octopus/association_collection.rb
@@ -12,4 +12,8 @@ module Octopus::AssociationCollection
   end
 end

-ActiveRecord::Associations::AssociationCollection.send(:include, Octopus::AssociationCollection)
\ No newline at end of file
+if ActiveRecord::VERSION::MAJOR >= 3 && ActiveRecord::VERSION::MINOR >=1
+  ActiveRecord::Associations::CollectionAssociation.send(:include, Octopus::AssociationCollection)
+else
+  ActiveRecord::Associations::AssociationCollection.send(:include, Octopus::AssociationCollection)
+end
diff --git a/lib/octopus/migration.rb b/lib/octopus/migration.rb
index 70bd8bd..7d9fd90 100644
--- a/lib/octopus/migration.rb
+++ b/lib/octopus/migration.rb
@@ -70,4 +70,8 @@ module Octopus::Migration
   end
 end

-ActiveRecord::Migration.extend(Octopus::Migration)
+if ActiveRecord::VERSION::MAJOR >= 3 && ActiveRecord::VERSION::MINOR >=1
+  ActiveRecord::Migration.send :include, Octopus::Migration
+else
+  ActiveRecord::Migration.extend(Octopus::Migration)
+end

from octopus.

sobrinho avatar sobrinho commented on August 19, 2024

@ctrochalakis the master branch is not ready for production, there a bunch of issues.

I'm working on it and when it stable, I will release a new version.

Closing.

from octopus.

smingins avatar smingins commented on August 19, 2024

I just hit this same issue with 0.4.0 and the hard active record dependency ... bundler installed 0.3.4 instead. I installed 0.4.0 with the ref that Xavier referred to but when I start Rails it fails with:

/Users/smingins/.rvm/gems/ruby-1.9.3-p327@cityeats/gems/activerecord-   3.2.11/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined method  `read_inheritable_attribute' for ActiveRecord::Base:Class (NoMethodError)
from /Users/smingins/.rvm/gems/ruby-1.9.3-p327@cityeats/bundler/gems/octopus- 7e585ecd35d3/lib/octopus/model.rb:55:in `should_use_normal_connection?'

We are using Rails/ActiveRecord 3.2.11. Are we stuck until 0.5.0 is released?

from octopus.

sobrinho avatar sobrinho commented on August 19, 2024

@smingins we are working to release the 0.5.0 this weekend.

Until there, you can use the master version, it's almost stable to use production but you need to make sure with a test suite ;)

from octopus.

smingins avatar smingins commented on August 19, 2024

@sobrinho ... thanks for the update :-)

from octopus.

ragalie avatar ragalie commented on August 19, 2024

You should double-check that the migrations work for you in a staging environment first. I'm not running master on production yet so there may be edge cases that I haven't discovered yet.

@sobrinho are you running the migrations stuff on production?

from octopus.

sobrinho avatar sobrinho commented on August 19, 2024

@ragalie not yet but it's working fine on my development environment.

from octopus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.