The new elasticsearch-ruby gem integrating with rails - ruby-on-rails

there is any way to integrate the new Elasticsearch gem for ruby to rails, the tire was great but retired since two month and replaced by the new gem, however, no integrating functions with rails yet.
all the tutorial use tire, but now, how we can using rails with Elasticsearch?

A full-featured Rails integration is being worked on. If you want the high-level integration, and you don't want to provide it yourself, you can stick with Tire.

There is another gem called "searchkick" that integrates elasticsearch with Rails:
https://github.com/ankane/searchkick
It has some really cool features and can index data through rake tasks.

I have a minmimal implementation that I'm currently running for prototyping / evaluation of ElasticSearch, which has not thrown up any spanner in the works for a very focused prototyping run for the past 2 days ...
There's little or no error response checking yet, since our workloads heavily use Resque and we rely on Resque to capture and identify where we need to fine tune error handling.
https://gist.github.com/TobiG77/8610788

Related

OrientDB integration for ruby on rails

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.

Rails app to engine

How we can convert a existing rails app(3.2.11) into a engine. We have some defined functionality in our rails app and we want to use this rails app functionality as engine so that we can add/share/mount this functionality with other rails app.
Do we have any available gem or any idea for this.
Thanks in advance!!
We have recently started doing this at my company and we will never look back. Engine gems are great for using the same logic across multiple projects.
That said, start with this railscast: Mountable Engines (I think this is the right link, it is blocked here at work so I can't verify for sure. If it's not then just google "railscasts engines.")
Also, check out the documentation here.
This is where we started and we released our engine in no time.

Advice needed to full text searching on mongoid

I've a mongoid embedded one to many model on Rails 3.1, to full text search within. I neet something very light and simple to deploy on heroku too, without having to pay for add-ons, initially.
All heroku Full-Text Search add-on currently, seem to have just paying plans (which is no good to start with), see Flying Sphinx and Websolr.
I need advice on a good solution (a ruby gem deployable on heroku) to start with and than to scale to other cloud services eventually.
Maybe MongoDB's core functionalities are enough for your needs:
http://www.mongodb.org/display/DOCS/Full+Text+Search+in+Mongo
There are two more possibilities that come into my mind:
1) you can use this gem:
https://github.com/mauriciozaffari/mongoid_search
2) you can use elasticsearch (http://www.elasticsearch.org/) and use the following gem:
https://github.com/karmi/tire
However, you couldnt use this solution with heroku only, you would have to setup your own server, for which in the case you want to use heroku, EC2 would be recommendable
We were using the sunspot_mongo gem with solr on Mongoid 2.4.
But after upgrading to Mongoid 3, support for sunspot seems to not be there. So we're investigating a move to elasticsearch with the tire gem. There are some new offerings in the "search as a service space" for elasticsearch, but they don't seem quite production ready yet, so hoping that changes quickly.
Hope it helps!

Which authentication gem/plugin should I use for Rails 3 running on CouchDB?

I'm building a Rails 3 application on CouchDB (using SimplyStored gem) and I'd like to use some existing gem/plugin for authentication, instead of building it from scratch.
Problem is, I can't find anything that works smoothly for CouchDB, everything assumes that you're running on ActiveRecord. Do you have any tips?
Try Using CouchRest_Model.
So, in the end I've used heavily customized Clearance gem for authentication. It's very flexible, so you're able to use it even for NoSQL database - but you have to rewrite most of the functionality (not by monkey-patching, all within limits of Clearance customization), which probably takes more effort that to write whole authentication from scratch. While a good-enough solution, but I'm sure there better ones.

What is the limit of Sinatra?

I've been learning the Ruby web framework Sinatra lately, and I'm finding it great to use. Most of the articles and blogs I have read about it seem to assume that it is good only for small websites, or 'tiny' web-apps. Is this true? Can a complete web application be built in Sinatra, or is Ruby on Rails the way to go?
You could, in theory, build an entire web application using Sinatra, and it would offer you more precision control than Ruby on Rails would.
That said, it also removes all of the nice features ruby on rails gives you, such as the Model-View-Controller architecture.
If you're looking to build a web application with database interaction, I strongly advise you use Ruby on Rails.
If you're looking to build a very simple API or something that just takes some data and throws it up onto Twitter or something, go ahead and use Sinatra.
There is no reason that it couldn't be used to build an enterprise website. It's fast and intuitive. Two key things in building a larger web application. While it does lack many of the features of Rails, I am yet to run into a road block.
I personally like the slim nature of Sinatra. It embraces routing instead of making it a headache.
I usually find myself wrestling with Rails, whereas I configure Sinatra to my liking.
As for database interaction, mongo_mapper + Sinatra works very well.

Resources