Embed Blog in Ruby on Rails - ruby-on-rails

I have a Ruby on Rails application and want to include a blog inside the application.
I was wondering what's the best way to do that. I don't want to have a link to an external blog. I want the blog integrated in my application. Also i don't have the time to programm the blog functionality. I want to use existing solutions.
What's the best way to accomplish that? Any recommendations? What are the best solutions?

The best way to include one application within another is by using engines. This might help you Ruby on Rails 3.1 Blog Engines

Perhaps Typo would address your needs installed as a Rails Engine.

Since nobody has done it so far I need to mention here that the spirit of Rails is to make everything friendly enough so that you can code your own.
It's a bit more work but then your blog module fits right in with the rest of the app.

Related

Ruby on Rails 3.1 Blog Engines

I see a lot of people asking about Blog Engines, but most of the questions & answers are rather old. Or if they aren't old most of the projects are old. I'm wondering if anyone knows of any Blog Engines that currently support Rails 3.1 or are at least being actively developed to support Rails 3.1.
I would also be interested in seeing any sample applications or blog posts written for Rails 3.1 Blogs. I am going to be adding a blog to one of my websites, and would prefer to simply use a Rails Engine or sample code if there are any good ones out there. I hate reinventing the wheel. Looking for something simple, and not too opinionated so I can modify easily to suit my own needs.
you might want to check out Refinery http://refinerycms.com/engines
doesn't look like they are 3.1 yet, but probably soon
https://github.com/resolve/refinerycms-blog
Your best bet would probably be to use Typo.
Typo is currently using rails 3.0.9. Rails 3.1.0 is still a release candidate so I don't know of any blogging apps using it right now. If you must use rails 3.1.0 then you may have luck grabbing the gem for 3.1.0.rc4 (the newest version) and using typo anyway. Chances are everything will still work.
Hope this helps.
Perhaps Enki is a good fit, currently at Rails 3.0 but there is a github branch with Rails 3.1 support.
http://www.enkiblog.com/
Interestingly BrowserCMS was recently made to be a mountable engine: https://github.com/browsermedia/browsercms/commit/6098699fed2e3dbd65815ac3a5ce0dd6acc103d2
Seem to have a bit of time and experience behind them. More akin to Concrete5 with an inline front end / in context editing facility for users, which can be a real plus.
Im looking into this now and Im getting to conclusion that the best way to do this would be mounting a rack-app(like sinatra) into your rails app, there's various basic sinatra blogs in github to start or copy, not to mention this is fully customizable and I guess very light-weight.. engines will likely have dependencies and may also break when updating gems, a rack app won`t
I wasn't able to find any satisfying solution with engines
other stuff I found:
mounting a rails app inside a rails app: http://blog.dynamic50.com/2010/02/22/rails-3-0-mount-multiple-apps-as-engines/ feels a bit weird(heavy?), but you could mount a fully featured app like enki...
http://planscope.io/blog/2012/03/08/mounting-a-blog-within-a-rails-3-application/ this blogpost talks about using Toto, it seems pretty nice, easy and simple... but the project is not being maintained and it doesn't seem to be able to support a lot of features...
I dunno about using git to post, it makes it really simple but I dunno if I'd like having non-code stuff in my commits
Monologue https://github.com/jipiboily/monologue . From their web:
It is a barebone blog engine for Rails. It is built as a Rails engine and with a focus on keeping very few dependencies to ease it's use in your project. You can also use monologue-markdown which will replace the default editor with a simple Markdown editor.
Seems like pretty active development also.

Blog for existing Ruby on Rails application

I have an existing rails application/website that I want to add a blog to. I would like to access it by www.existingapplication.com/blog so I was thinking it would need to be some kind of plugin or engine or something. Does something like this exist? The main thing is that it can't be a standalone rails application, it has to be an addon to an existing app.
I was looking for something similar as well and stumbled upon Rails Engine.
It is a great way to create one.
As for you, just use this:
https://github.com/jipiboily/monologue
Someone already created an app to help add a blog to your site.
Good luck!
Why not just use Tumblr or similar, and redirect (or proxy) requests to /blog to it? If you're willing to use blog.application.com, you can even just set up a cname and be done with it. Blogging is a very solved problem at this point, and it makes little sense to staple one onto your application at the code level.
If you run it on a subdomain (blog.existingapplication.com/) it is even easier to setup and will definitely be doable through Heroku.

Any Rails projects that allow community blogging?

I've been looking on Github for a Rails project that allows anyone to sign in and add a blog entry.
Has anyone seen something like this?
TYPO is a blogging platform that uses Ruby on Rails:
https://github.com/fdv/typo/wiki looks to have the capability for multiple authors.
The article here gives a good overview of several other RoR blogging platforms that are out there.
IMHO this is quite easy to make. Especially if you use the twitter-auth gem. Just sign-in with your twitter account, write a post and be done with it.

Modularizing Rails applications

I'm looking for a way to modularize Rails applications. As I've seen there is no built-in way of accomplishing it. I've found different plugins/core hacks but I feel untrusted about the way they work and their maturity.
Do you have any experience on this?
So far I found this ones:
Desert: http://github.com/pivotal/desert
Rails engines: http://rails-engines.org/
Rails engines are part of the current stable rails 2.X and so aren't really "hacks" anymore. They seem like a good fit if you want to add fairly course-grained application functionality to an application - a good example might be adding a blog or CMS-style functionality to another application. Checkout the railscast on engines here: http://railscasts.com/episodes/149-rails-engines
If you're looking to modularize on the front end - more "widget" style, you might want to look at cells: http://github.com/apotonick/cells/

Building User ID/Password Functionality with Ruby on Rails? Overkill?

I am new to this community, but I am working on a site that requires implementation of a user/password/register check upon entry, which would check against a database, or write to the database, in the case of registration. I have experience with XHTML and CSS, and just discovered RoR. I honestly have very little insight into how to achieve my goal using just XHTML, so I decided to learn Ruby, taking a shot in the dark. I'm wondering if there's an easier language, or more direct fix that I should be implementing instead. Any thoughts?
I would recommend looking at Restful Authentication.
Also, for good code examples in general, have a look at Altered Beast. It's a forum built in Ruby on Rails and it uses Restful Authentication.
Are you looking for information on how to implement user authentication in Rails? You could try acts_as_authenticated.
Check out the book called Agile Web Development with rails. It has two parts, a step-by-step walkthrough of creating an application, and a reference section on rails. I recently started a contract job where I chose RoR as my framework without any experience in it. This book has been an immense resource to teach me Ruby on Rails. It also specifically teaches how to implement the authorization you are talking about.

Resources