Add blog to Rails app on Heroku - ruby-on-rails

I have a Rails app on Heroku with a Jekyll blog located at blog.myapp.com. I want to move the blog to www.myapp.com/blog/. What's the best way to do this? I'm happy to ditch Jekyll if there is an easier option. Thanks!

Bloggy seems to be what you're looking for.
"Bloggy is a simple gem that helps you generate a jekyll blog within your rails application by using generator commands similar to the ones you are used to already."

You should be able to change the base-url configuration to /blog for this to work.
https://github.com/mojombo/jekyll/wiki/Configuration

Related

Ruby on Rails run at Blogspot?

I tried to build a ruby-based website. but I want to start on blogspot which is free for beginners. can the ruby system be placed on blogspot, I am very happy if this happens.
No Blogspot does not support ruby on rails. Even it is just a blogging platform where you already have CMS to serve you. But you should have a development environment. Please try Heroku.com if you want free.
check this tutorial https://devcenter.heroku.com/articles/getting-started-with-rails5 to launch your first application on Heroku.
You can add the following lines after
rails generate controller welcome
rails generate scaffold product name 'price:decimal{7,2}'
rails db:migrate
This will create a sample application where you can do all CRUD operation on product. you can try following
rails s
Now visit localhost:3000/products
After installation on Heroku you will get your url where you can run app and do all CRUD operation. Just try it is very easy to do.
If you are working with Ruby on Rails, consider to work with another platform like Wordpress instead. But I think it takes time.

How do I include new gems that are automatically there whenever I create a new rails app?

Usually, I paste the gem code in the gem file and bundle install. But I realised I have multiple gems I use over and over. How do I include those gems automatically whenever I create a new rails app?
Any help appreciated. I'm still new. Thank you
I have a starter template for new rails apps that I use. Basically has my testing gems ect. and certain folders that I like created in each. Basically rather than rails newing I will just clone the starter repo.
I think he might be referring to just having an initial app that you can clone yourself like copy+paste
It's a nice idea, but I don't know an automated solution to this.

Ruby Blog Engine like toto

Is there any other ruby blog engine like toto which could be easily deployed on services like heroku?
If yes, Please suggest some names.
Thanks in advance.
I would Radiant CMS, this how to install it on Heroku. It has a great blog built right in.
Checkout scanty and jekyll really small and fast ... hackers style blogging engine.~
https://github.com/adamwiggins/scanty
https://github.com/mojombo/jekyll

Just started a new spree app, but can't find a way to generate theme_default

Anyone know how to generate a default_theme so that it can be edited? It seems that all the core files are hidden and uneditable.
The last working spree app I made started with theme_default exposed under vendor/plugins.
Because this one is in Rails3, I pulled it right from the official railsdog git, thus no theme_default, and no haml.
I'm probably missing something obvious. Any ideas?
Basically, to create your own views, the starting point is to create our own extension. You can achieve this with the command you'll find here:
http://spreecommerce.com/documentation/extensions.html#creatingan-extension
Then it's like any raRails Engine, you can create the views you want, they'll override spree's.
Is rake sandbox what you are looking for? See Building a Sandbox Application
You only do rake sandbox just for test purpose, I have found this link
Change the command for rails g spree:extension [ext_name].

Adding wordpress Blog in a Rails application

I have Rails application deployed on my home root directory of a domain and symlinked with my public_html/applicationname.com/. I wanted to install wordpress in applicationname.com/blog path. But rails ain`t allowing me to do so. I have tried a subdomain as well, but still, the routes are being handled by Rails.
What would be the best solution to deploy a blog along with Rails application ?
I can only think of .htaccess modification.
You should put your blog into the rails' public directory.That's the place for static files (and php ones are).
If you are deploying your rails app using Passenger then you can disable Passenger for a particular location. See section 5.8 of the documentation, which has an example for WordPress.
This article may be useful to anyone looking to solve this problem:
http://www.spotscore.com/blog/2009/11/22/how-to-host-wordpress-and-phusion-passenger-rails-app-on-the-same-domain/
Check the post :
http://joomlist.com/2011/10/php-in-subdirectory-of-rubyonrails/. it worked using passenger with apache.

Resources