Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am using indextank with heroku. Which is a better gem to use, indextank or thinkingtank? I looked at the documentation, and tutorials for both,and it seems like thinkingtank is easier to use. A related/follow up question: what are the advantages/disadvantages of each?
It depends on what you're doing. If you are writing a simple app that's not based on ActiveRecord, the indextank client lets you add and search content without storing anything within your app. An example: if you are fetching tweets, you could index them directly without having a data model on your side. It's more "low level", so to speak.
If you are using ActiveRecord or another ORM, you should take a look at Tanker, it's more actively developed than ThinkingTank:
https://github.com/kidpollo/tanker
Hope this answers your question, if not please come chat with us at http://indextank.com (chat widget on the main page) and we'll be happy to help!
As Diego said, Tanker does seem like it has much going for it. Alternatively you could use IndexTanked:
https://github.com/zencoder/index-tanked
We wrote this library to power search on zencoder.com. Documentation is non-existant so far, but is coming.
One important feature included in IndexTanked, that was a necessity for us, was fault-tolerance. IndexTanked includes configurable fallback methods for use in case of failure to index, delete from the index, or search. Additionally, it limits calls to indextank by checking if the indexed fields have changed on updates. You can even obtain which fields we're checking against so you can select the minimum viable fields to be indexed when needed.
You can drop the author, Adam, a line at adam#zencoder.com if you have an questions (perfectly reasonable with the lack of docs).
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm a bit new in rails development I'm modeling a website with few resources and so far so good. But here is my question:
I would like to allow the admin users to manage information show in most of the pages: Application name, telephone number, address, default email and this kind of things.
My current idea is make a model Property with name and value, but somehow I'm not convinced about this approach because I'll need to access the database to get this values for every request.
Thanks everyone for your time! :D
This seems like an OK approach. If you implement caching, it no longer will hit the db with every request, and honestly it probably isn't really that big of a deal even without the caching. Build it the way you need, and optimize afterward, if necessary.
With all this being said, it may be worth considering how much things like the phone number are going to change, and balance the cost of developing a dynamic solution against the time it would take to change once, 3 years from now (if the number ever does change), in a partial.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am adding react to a rails ecommerce website and also changing the search engine from sphynx to algolia. For this I am using react-instantsearch but I'm having a hard time integrating algolia's widgets mainly because the documentation is very unclear and I'm not sure how things are working behind the scenes. I was wondering if it would be better to use elasticsearch instead, as everything is more customisable, but I worry that the user experience will not be so spectacular.
Which one do you think is best in this situation?
Disclaimer: I'm an elastic employee
You should give a try to the site search offer that elastic provides. See https://www.elastic.co/solutions/site-search
It's a great way to get Site Search as a service without having to worry about the internals.
If you prefer to have more control but don't want to manage the cluster by yourself, have a look at https://cloud.elastic.co.
If you want to do all that manually or go to the open source only way, you can run an instance somewhere in the cloud and install elasticsearch manually.
I can't say about Algolia as I never used their service.
Disclaimer: I'm an Algolia employee.
You can achieve a very high degree of customization with Algolia and React InstantSearch. If you are having trouble customizing the widgets (which are designed to be drop-in) you can try Connectors instead:
Connectors are higher order components. They encapsulate the logic for a specific search concept and they provide a way to interact with the instantsearch context.
Internally, the widgets are just pre-packaged implementations of Connectors. If there is a particular widget/connector you are having an issue with, add a comment and I'm happy to look into it!
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
This is a very broad question, so please bear with me.
I wanted to create an app that gets data from another website, specifically medium.com. However, I don't think medium has an API.
Specifically, what I wanted to achieve is to search the medium.com of articles that has 500 or more likes, or perhaps one that has 50 or more responses (comments). I wanted to do it with ruby on
How do you think I can do that? Please if you know how, point me in the right direction. Thank you in advance :)
I would recommend webscraping using the ruby gem called nokogiri.
It is a generic way of obtaining data that can be used for almost any website.
Take a look at these links to get started :-)
Web Scraping with Ruby and Nokogiri for Beginners
And a personal favourite
Parsing HTML with Nokogiri
Currently, there is no API to get all POSTS, neither search them, see https://github.com/Medium/medium-api-docs/issues/48
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
So, what most comfortable and useful for developer? A similar question was already 4 years ago, and many things could change.
http://activeadmin.info/
https://github.com/sferik/rails_admin
or maybe Typus https://github.com/typus/typus???
Disclaimer: this is only opinion. This kind of question can have no 'correct' answer.
I use Rails Admin a lot on my current main project. It has advantages and disadvantages.
Advantages:
It handles things like nested forms for ActiveRecord relationships out of the box.
Disadvantages:
Adding features or custom behaviour is quite difficult and documentation is over-complex and fragmented.
Putting the DSL for CMS behaviour in the models is not great for code separation.
The default style is a little outdated.
The DSL itself is over-complex, badly documented and prone to code bloat and duplication.
The use of PJAX for page updates can complicate any JS you wish to add to the page. (If you're not careful your code will be run multiple times, or not at all, for a single page.)
The default mechanism for saving content items is incompatible with a database that uses referential integrity. This is a very bad thing. (I ended up patching this code.)
I haven't used ActiveAdmin as much, but when I have I noticed the following things:
Out-of-the-box, you have to roll more of your own features when it comes to things like nested forms for relationships. (This may have changed over time.)
It looks lovely.
The DSL is neatly separated from the model code and feels more logical.
Adding your own features is a lot easier with less code.
Adding JS is pretty trivial.
I don't know if Active Admin is better for referential integrity, but if this interests you let me know in comments and I'll set up a couple of trial projects to show you what I mean.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I once found a slick looking car make/model dropdown menu web service that advertised form helpers for Ruby on Rails, have subsequently been unable to find this again by Googling for it.... Anybody know the service I am talking about?
Edmunds provides this data for free through an API. You just have to sign-up to get an API key.
See documentation here:
http://developer.edmunds.com/api-documentation/vehicle/
Sign-up to get a key here: http://developer.edmunds.com/index.html
One example of making the call (many more examples given on their site):
https://api.edmunds.com/api/vehicle/v2/makes?fmt=json&api_key={your API key}
I was looking for exactly this kind of information for motorcycles. From what I can tell the API does not provide motorcycle data, but it seems to have just about everything for cars - Make, Model, Year, Trim, Style, even Maintenance Schedules.
With the json or xml data, you will have to roll your own drop down menus. Edmunds does provide some premade widgets, but they are pretty specific (e.g. return True Market Value), so there is a good chance they won't have exactly what you need.
http://developer.edmunds.com/widgets_and_apps/index.html
It doesn't include form helpers or anything, but here's a Ruby implementation that uses the KBB database to retrieve make/model info:
http://tektastic.com/2008/03/car-or-auto-make-model-year-database.html
I'd probably cron this outside of the app and update the db from time to time, then use collection_select in the app to construct the dropdowns as normal. You could also adapt it to use ActiveResource for live retrieval, but that seems excessive and perhaps bannable by KBB.