rails 3 blog engine/gem that works on heroku, what to use? - ruby-on-rails-3

I have spent some time looking for a rail3 blog engine for use on an existing site. I want the blog on the same domain as the application for SEO points eg www.site.com/blog not blog.site.com
Having spent some time on this I have found:
Toto
Jekyll.
Which generate static pages, I really like this idea as its optimal under-load as its highly cached. Not sure how our not technical blog writers will cope with this.
Also I looked at more dynamic platforms like:
typo (which seams dated, I guess they are finding it hard to port to rails 3)
mephisto
Are people giving up on this as this post Need to link WP Blog with Rails App on Heroku suggests? Seams crazy given the value of this. Also, this post was good but not really conclusive for me https://stackoverflow.com/questions/1807670/blog-engine-for-rails-application.

I've been really impressed by monologue, so far.
https://github.com/jipiboily/monologue
It's a bare-bones db-backed blog engine.

One of the creators of heroku wrote a small blog engine.
https://github.com/adamwiggins/scanty

Related

Advanced Ajax with RoR and jQuery UI

I don't have much web development practical experience although I had studied a lot on the web (Treehouse, CodeSchool, other tutorials and articles).
I have found some explanations on how to use Ajax with RoR and jQuery. But I'm having difficulties to understand how to solve my problem as the explanations often use jquery-ujs that I suppose I can't use in my case.
My problem is difficult to explain here but is similar to implementing this shopping cart on RoR, including more parameters like price
The jQuery UI is working for me in my RoR application. What is missing is the AJAX part and how to make it work with RoR
I have found some questions here on StackOverflow that is about this topic but it didn't helped much as they are probably for more advanced users.
So, I believe that the best help would be a tutorial or book or some other reference that is more similar to my problem. However any advice or other kind of directions may help
After struggling a lot, finally I solved my problem.
I will post here the resources and some tricks that helped me. I hope it can help others. StackOverflow didn't let me post all the links. For this reason, I just gave some hints that may help to find some resources.
About the jQuery Ajax concepts, I recommend Code School jquery course "The Return Flight".
The second thing that I think helps is learn to debug. Firebug helped me a log to debug the client side/javascript/Ajax. This link may help on that:
http://www.zyxware.com/articles/2642/debugging-tips-how-to-debug-ajax-requests-using-mozilla-firefox-and-firebug
Since the problem may be to debug RoR. Look for a RailCast on the subject.
One of the things that I took some time is if it would be better to use $.ajax(), $.post(), $.get() or $.getJSON(). The link below may explain better but to sum it up, $.ajax() is the more generic one and the other are simpler ones and that call $.ajax() with specific parameters.
Difference between $.post and $.ajax?
It is important to understand how RoR routing works to call the right url with the right $.ajax() type. "rake routes" may help.
This link may also help to use the right $.ajax() type.
http://old.thoughtsincomputation.com/posts/understanding-rest-in-rails-3
Finally, to send the right format from the javascript to RoR controller, this link may help:
How to send and store data to rails through jquery/ajax as a JSON object?

Authentication system in Rails 3 . Devise / omniauth or self coded?

I am a newbie in ROR developement. I am trying to create my own application with the help of Ruby on Rails tutorial 2nd edition. I made many reseaches. I need your comments about devise or any other authentications system or as the book offers us to write our own authentication systems.
What are your ideas? Is it wasting time to write your own authentication system?
i'm quite new to RoR myself but i used Devise so far (and according to the book i'm currently reading it is worth it).
You could use the Railscasts about Devise if you want an introduction to it:
http://railscasts.com/episodes/209-introducing-devise
And as it is quite easy to learn and well featured i'd say it is pretty overkill to write your own.
I am a huge advocate of Devise, and also of not recreating the wheel. My rebuttal question would be why go through the trouble of creating your own authentication solution, when in just a few short bash commands, Devise will be installed and running. The configuration options alone are enough to choose Devise, not to mention that almost every part of the engine has the ability to be overridden with your own code.
There are hundreds of blog posts out there that can easily get you started with running Devise. As always with any gem, I would recommend starting out with browsing the source code, and then turning to the wiki for the answers that you seek. As #krizz mentioned, Ryan Bates' Railscasts are always a great place to turn when you need to see it setup.
And of course, you can always turn back here to the stack when you get stuck.

https for facebook applications

Read a lot about the new guidelines for facebook developer,
but i got know real answer about this:
Do I realy need a https-website to get an app running?
Anyone got it running via ssl-proxy?
Thx Sven
Not really a stackoverflow.com question, nor is this (1) something not covered by Facebook already (see http://developers.facebook.com/blog/post/497/). In short, yes, you must have SSL-ready server.
As for (2) stackoverflow.com is not a platform meant to advertise products. Your most likely answer is http://godaddy.com (personally not using any godaddy.com services and would not recommend them for any other reason that price).
There are a lot of alternatives, e.g. http://networksolutions.com, http://rapidssl.com (see http://www.cheapssls.com/ for more offers).

Forum solution for Rails 3 and Devise?

I'm looking for a forum solution for a website I'm building. I'm using Devise and Rails 3, so does there exist any pluggable solutions?
What about 3rd party services?
The goal of Community, is to provide a simple, and easy to setup forum application without having to dictate how your site it setup.
https://github.com/gitt/community
You could build one yourself, you'll be surprised that it's not that time consuming, and you won't have to deal with the bloat that 3rd party solutions might come with. Here is a good place to start.
Savage Beast, Altered Beast and rBoard may be good starting points, but note that they are only for Rails 2.x afaics.
Note: rBoard has a Rails 3 branch but I have no idea how stable that is.

Full text search for Rails 3

I’m evaluating full text search methods for Rails 3 ATM. Does anyone here have a recommendation? Seems to me as if most of the known methods (Sunspot, Sphinx, Ferret, Xapian) aren’t yet ready for Rails 3. Is that so? At the moment I’ve got plenty of resources left on the machine were I’d like to deploy my app but nevertheless, I’d like to keep the idle load for the search engine as low as possible. I’m planning to use PostgreSQL if that’s of any relevance here.
After some reading I’m almost sure that I’d like to use Sunspot or Xapian. But if there’s any other (and better) solution please tell me :-) Especially regarding Sunspot I’m not sure if it was clever to have a complete Tomcat running in addition to my Rails app. Anyone has experience with this constellation?
Thanks in advance,
Ulf
If you are using PostgreSQL you can get an awful lot out of its built-in text search capabilities before you need to reach for external libraries. I've been using tsearch queries for years with excellent results.
PostgreSQL full text search analyses word proximity to calculate Relevance & ranking and offers useful features like highlighting of search results.
It is also aware of language specific normalisation rules, for example it knows to ignore the s and es pluralization suffixes in English; so searches for 'country' will also bring back highlighted results for 'countries', much the same way that Google does.
I'm not suggesting that you shouldn't use the libraries that you've mentioned, but it is worth investigating the database to see if will already fulfil the majority, if not all of your requirements.
You can use sunspot with Rails3, no problem. We have done so successfully using the sunspot/sunspot_rails gems (1.2.rc4). And it's not too much of a hassle to run Solr within a Tomcat server.
For fulltext-search features you should use a search engine.
For example you could use the Lucene Library with jRuby.
If you like to stay with standard Ruby (cRuby) you coud use Solr.
For rails there are also some Solr plugins:
For example starting with http://wiki.apache.org/solr/SolRuby could be a good idea.
Sunspot is Rails3 ready, we're using it on a few Rails3 apps already. I've had a lot of success with Solr and Sunspot. So much that we're starting a blog series on it