Is there a list of supported databases for RoR? I'm looking for MongoDB support but couldn't find anything official.
I'm a python/djangoist and have no clue for what keyword I should search in the RoR world. :(
All official I could find was that small list saying:
Migrations are currently supported in MySQL, PostgreSQL, SQLite, SQL Server, Sybase, and Oracle (all supported databases except DB2).
Are these all? Or is there maybe an app/plugin/whatever-its-called for RoR I could use?
First Question:
You are looking for supported databases officially covered by activerecord, the ORM default implementation in ruby on rails.
These are the supported connection adapters out of the box without gem enhancements.
Only these databases:
MySQL, PostgreSQL, SQLite
Source Code:
https://github.com/rails/rails/tree/master/activerecord/lib/active_record/connection_adapters
Second Question:
Mongo-Mapper is the gem that should be used to integrate MongoDB into Ruby On Rails 3.
Ruby Gem:
http://rubygems.org/gems/mongo_mapper
Instructions:
http://www.mongodb.org/display/DOCS/Rails+3+-+Getting+Started
As a start you may want to check out the Ruby Toolbox in the category of MongoDB clients.
Related
I am building a IT infrastructure inventory in a highly heterogeneous environment. I use Rails 5.4, and will soon upgrade to Rails 7.
Focusing on database servers, we have Postgres, Microsoft, Oracle, Teradata, Sybase, SAS (so far) - in various versions. I'd like to be able to initiate a connection and trigger some basic queries to each of them to get a status. And I would like to keep it DRY!
I found the DBI gem (DataBaseInterface), which needs to be completed by DBD (DataBaseDriver) gems, one for each technology. But this seems to be quite old, hardly maintained ...
I added to my Gemfile:
# Database Interface
gem 'dbi'
gem 'dbd-pg'
And tried in the console to reach my Postgres database (from GitHub repository):
dbh=DBI.connect("DBI:Pg:dqm_dev:localhost", 'dqm', 'dqm')
Which always ends up with:
NameError (uninitialized constant DBI::DBD::Pg::Database::PGError)
Any idea how to solve this?
I could not find recent documentation for using this with Ruby.
Do you know where to find some?
Is it worth using this approach?
Would you recommend an alternate solution?
Thanks a lot!
QUESTION: Is there a go-to GUI or visual interface that can be used with the PostgreSQL database in Ruby on Rails?
1. SUMMARIZING THE PROBLEM
It would be easier for me to work with the database in Rails if I had a good visual interface. I think that RailsAdmin seems like a good option, but I am wondering what is the most popular/widely-used interace.
2. WHAT I'VE TRIED
I have seen that people can integrate MySQL and the MySQL Workbench with Ruby on Rails. I am curious if there is an easy-to-use gem that provides a visual interface for the PostgreSQL database in Rails. Below are a couple of questions with some decent answers. However, I am curious about what would be the standard or go-to interface.
Visual Interface to database mysql with Ruby on Rails
Is there a "phpmyadmin" for Ruby on Rails?
Thank you in advance for reading my question and I look forward to reviewing the answers!
I heard Postico https://eggerapps.at/postico/ is nice.
You can write and test your sql there and see the results
Table Plus is great. Far better than Sequel Pro IMHO.
If you're looking for a Rails Admin alternative, I would check out Active Admin
What are the options to integrate OrientDB with Ruby on Rails 4 ? I have found many gems for JRuby but there is no active gem for MRI Ruby.
I need document database and graphdatabase, so OrientDB should be interesting for my project.
This is a native Ruby client, though i don't think you can drop it directly into a rails app and work on it like mongoid, ActiveRecord, etc.
https://rubygems.org/gems/orient_db_client
Its 100% ruby so it should be compatible with MRI.
We are using https://github.com/veny/orientdb4r in production, which doesn't require JRuby, and it's been pretty good so far. We only use the REST client, which is obviously going to be slower than any of the other ways of interacting with OrientDB. The gem offers a binary client as well, but I haven't used it, and I think it's still in development.
I am using neoid with rails. Currently I am forced to use sqlite3 together with neo4j because I haven't yet figured out how to use only neo4j in my project. I guess I need to know which adapter should I specify in database.yml for neoid.
I found an answer on my question:
https://github.com/elado/neoid/issues/9
There is no way to use neoid without regular database (such as MySQL, PostgreSQL or SQLite).
In the introductory tutorials, it talks about MySQL, Postgre and Sqlite3. Is anything else supported out-of-the-box? Are there any plugins to support other databases?
I'm mainly interested in NoSQL - Cassandra, CouchDB, etc.
Thanks
Activerecord (Rails' default ORM) supports MySQL, Postgres, and sqlite3. If you want to use a different ORM, you have many more choices.
Some links to get you started:
DataMapper, a popular alternative ORM
Sequel, another alternative ORM
Rails wiki article on using CouchDB
Mongoid, for MongoDB
MongoMapper, an alternative for MongoDB
I don't have enough experience with Cassandra to mention anything for it. This frontier has not been fully explored.
The game is likely to change some when Rails 3 comes out soon. Expect a lot of choices in this area to sprout up.
Take a look here and here and this last one(for couch). Also - if you're using JRuby - you can use any database that has a JDBC driver - which is just about every database around there.
Ruby on Rails 3 ( still in beta ) is ORM agnostic. So You can change your ORM. Or even you can not use ORM.
So the limitation is in Ruby, not in Ruby on Rails. in futur.
The ActiveModel gem help you with several librarie for compatibility. So you can even made you backend in File or with your own database.
Here we can see on the source code the list of available DBs: https://github.com/rails/rails/tree/b002141b1ba2eef5d192ec31bec5340f7ecca5e9/activerecord/lib/active_record/connection_adapters which as shqdowbq mentions is PostgreSQL, MySQL and SQLite.
https://www.ruby-toolbox.com/categories/Active_Record_DB_Adapters contains a list of third party adapters for other databases, listed options include:
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter for Microsoft SQL Server
https://github.com/rsim/oracle-enhanced for Oracle
Related question: List of supported databases?