Comments (12)
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.
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.
@tchandy - ping? @austinmills has a good question and I'm sure others would like to know the answer as well.
from octopus.
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.
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.
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.
@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.
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.
@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.
@sobrinho ... thanks for the update :-)
from octopus.
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.
@ragalie not yet but it's working fine on my development environment.
from octopus.
Related Issues (20)
- Octopus 0.10.2 / Rails 5.1.5 / Sidekiq workers eventually run out of memory and freeze
- Not able to access the wiki page HOT 4
- Config file setting of wiki is outdated? HOT 1
- could not obtain a database connection within 5.000 seconds HOT 2
- Rails 6 migration / compatibility HOT 3
- How does the ActiveRecord connection pool interact with Octopus? HOT 4
- Rails 6 release HOT 6
- Octopus error at startup with Rails 6: `alias_method': undefined method `any?' for class `ActiveRecord::Associations::CollectionAssociation' (NameError) HOT 7
- Update methods sent to read-only database with identity_cache gem
- Sidekiq job random failures due to proxy_config is nil
- octopus for ruby project HOT 1
- Delayed Job + Octopus 0.10.2 issues on Rails 5.2 (undefined method `any?' for nil:NilClass) HOT 2
- ActiveRecord 5.2 StatementCache Pins Queries to Shards
- Octopus is already running
- octopus 0.6.1 make rake unit test failling.. HOT 1
- Would sponsorship help? HOT 2
- I can't able to use gem 'ar-octopus' in rails 6.0.3 HOT 2
- Octopus doesn't work with Rails' schema cache HOT 1
- New Maintainer HOT 4
- Preventing Duplicate Migrations on the Same Shard for Rails > 5.2 and ar-octopus (0.10.2) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from octopus.