Blog for existing Ruby on Rails application - ruby-on-rails

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.

Related

How to nest a Rails application into another rails application

Lets say have a main app, that also has a blog, I like to keep the "blog" part of the app as a separate rails app and re-use it in other rails apps as well.
How should I do it?
The currently popular method to do what you are trying to achieve is to use Engines. Engines basically let you mount one application inside another, allowing you to do anything from add a method or two, to adding a complete blog. The official guides have a very nice step-by-step guide to getting started, and there are many good unofficial guides, as well. An engine basically consists of a little bit of initialization code, the application code, and a dummy application for testing and development. It might look intimidating, at first, but it's much easier than it sounds, at first. Good luck

Ruby on Rails integrated with Wordpress site

I'm working on an Ruby on Rails exercise listing application (https://rbzexercise.herokuapp.com) and I'm trying to integrate it with a Wordpress site (http://www.rubberbanditz.com). Is there an easy way to do the integration? As you can see, both are pretty established, so I'd really prefer not to have to rewrite either. Right now i'm using a work around that involves an iframe within the page http://rubberbanditz.com/exercise-library/, but we don't get any of the "google juice" from it.
Update:
Based on the comments, I've started looking into integrating the app to exercise.rubberbanditz.com, but following the directions at https://devcenter.heroku.com/articles/custom-domains doesn't seem to be doing the job. when going to exercise.rubberbanditz.com i just automatically get forwarded to the main page. Does anyone have any experience with setting a rails app to a subdomain, and can you point me to a good tutorial?
Thanks for any help!
Jason
Your iframe method is fine, but might lead to seo problems, since all of your links are trapped in the iframe.
Another option would be to take your WordPress theme and rebuild it in your /app/views/layouts/application.html.erb template. Once that's done, make a subdomain (maybe app.rubberbanditz.com or workouts.rubberbanditz.com) and setup your heroku app to use the new subdomain.
Google should view the two subdomains as the same website, especially if you're sharing common navigation elements, and both sites link to each other frequently.
The biggest downside is that now you'll have to update your design in two different places, which can be a huge pain in the ass.
I've used this approach before, running-php-inside-a-rails-app, for running php inside a rails application. Not sure if anything extra will be required for wordpress since I was just rendering a single page.

Is it possible to achieve following with Rails (+ Nesta): myapp.com/blog/1/post/4?

I am trying various CMS for current project and Nesta looks interesting. I wonder though, how (if it is at all possible) one would model an app, where multiple users can create blogs via Nesta integrated into an existing Rails app?
I guess, I have to mount Nesta via Rack, but how to make it so that there is a possibility for each user to start a new blog?
Smth like: http://myapp.com/blog/1/post/4
would be really great.
How do I achieve this?
Thanks a log
P.S. I am not married to Nesta (although it looks nice).
I don't know about Nesta, but to do some URLs like that, you should look at nested resources : http://guides.rubyonrails.org/routing.html#nested-resources.

Embed Blog in 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.

Advice for Setting Up Rails Sites for Prototyping

I'm learning Ruby on Rails and have just signed up with LunarPages as my webhosting company. To start, I want to write some test applications and get them uploaded and running on my website just to understand how things work. However, I don't want anyone looking at what I'm working on as I learn. Does anyone have any advice as to how I should structure my pages and sites in such a way that I can keep them hidden until I'm ready to go live? Can I easily do something like this?
www.mysite.com <- everyone can see
www.mysite.com/testapplication1 <- no one can see for now
www.mysite.com/testapplication2 <- no one can see for now
Sorry if this sounds like a stupid question. I'm just starting out. By the way, I have heard of Heroku but I've already paid for this webhosting service so I'd like to get my money's worth, at least until my subscription is up.
Thanks!
I'm not sure if LunarPages offers the level of configurability that is required to run rails apps from sub-directories. I'd use subdomains (testapp1.mysite.com, testapp2.mysite.com) and then use appropriate access control (could be htaccess, HTTP BASIC AUTH in your app, or something more complex like authlogic)

Resources