Ruby on Rails: Data gather from blogsites [closed] - ruby-on-rails

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

Related

hashes -- Seem like mutant potatoes [closed]

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 7 years ago.
Improve this question
What I have researched about hashes doesn't make them that much clearer to me... what I see is a new [THING] that I cannot see the value in right now. I would RTFM if I could find one worth a beans instead of asking... here is what I was wondering...
I've been looking for answers for a few days now with now avail
Where the heck is a syntax manual for Ruby and further more RoR.
What are these things good for...
I know twitter somehow relies on something of this nature but what is exactly
There's a wealth of information out there, http://ruby-doc.org/core-2.3.0/Hash.html for example is pretty clear on what hashes are.
You need to get your head around some of the basics, there are plenty of tutorials out there, https://www.railstutorial.org/ is one that comes up often, http://guides.rubyonrails.org/getting_started.html is the most obvious place to start.

How to text data from website [closed]

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 8 years ago.
Improve this question
Hi Im currently developing an app where I have some text which informs the user about something. This information is also on my website and what i want to do is when i change the information on my website I also want the text in my app to change. I know that you can create a backend tableview with for example parse but that's not what Im looking for. I've done som research and think what i need do to is use JSON in some way to display the text from my website in my app. Pleas comment If you don't understand what It s that Im trying to accomplish. If you could either link a tutorial or explain how/if this is possible I would appreciate It very much!
you can make a json call from your app to a url and have a script or file in your website that returns the information you want, this will make it easy to change it in future. then use the same script as the basis ( again using a json call) to get the text for the specific webpage.
It's difficult to answer more specifically since you've mentioned no technology base for your website.

Where to begin when developing a Rails app [closed]

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 9 years ago.
Improve this question
I am a beginner at web development and wanted to know where to begin when developing a web application. More specifically I am using RoR and wanted to know is there a particular stack developers start with for instance would it be better to start developing models or views? Or do I have the wrong approach all together.
This will guide you through installation and 'hello world' in rails.
http://guides.rubyonrails.org/getting_started.html
And I highly recommend this book, if you are serious about rails. Finish it completely. It would give you insights which might take months to comprehend if you are searching only in web.
Book link: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
Rails sort of has two "default" stacks, as this blog post helpfully explains:
http://words.steveklabnik.com/rails-has-two-default-stacks
You'll see that mr. Klabnik also has some thoughts about the difficulty this creates for new developers. I'd recommend not worrying too much about all the different tools that are available to you at first. Wait until you have a problem or are experiencing some pain and then find a tool to solve that problem. Before that, just jump in and learn as you go. Or at least, that's how I'd approach it, but people learn differently!

Do or do not use Ruby on Rails Associations [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am new in RoR , and I wanted to design a web based system. I want to know , if we don't use association in RoR , do happen any problem in system?
Please help me and explain me what problem could be happen in such a system.
thanks
The associations that Rails provides you gives some methods that would make your querying simpler, more readable, maintainable and effective.
Try writing two versions of a Customer-Orders application and then Customer-Order-Supplier 1) with associations and the other without and perform some different type of queries and see the beauty of queries where associations was exploited. From the queries executed you can also see the time they take from the Rails log. Then go into some more complicated examples to delve deeper. You can find some simple examples to start with in the Rails guides.

Which is a better gem for indextank? [closed]

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).

Resources