How can I install Publify (Typo) on an existing site? - ruby-on-rails

How can I install Publify on an existing rails app in the subdirectory /blog? I am running rails 3.2. Can anyone help? Or at least point me in the right direction? Thanks!
A similar question was asked, but never answered here.

Before following below steps you should know there will be two applications: your main application and publify application. So both should run on different ports.
Download source code from https://github.com/publify/publify. Follow the guide and run this application. It is very easy to run and install, everything is mentioned clearly. If any error you got while installation, post the error.
Run publify application to some port let us say localhost:3000
Let us say you have your main application which runs at localhost:4000
In your views just write this script which will rediret you from your main application to publify running at localhost:3000 by link_to method.
Now you can use publify.

Related

I have a complete ruby project on my system but how do I run it?

I have a complete ruby project on my system that I downloaded from github.com and I want to run it on my Windows machine.
I have already installed Ruby and Rails on my system, but I have no idea how to run this project. The directory of this project is something like:
C:\Users\{username}\Desktop\BitcoinFundi\BitcoinFundi
How would I run this project on my system?
To run your Ruby on Rails application, use the following command:
rails server
This will start the server and you will be able to access the application in your browser at http://localhost:3000. Port 3000 is default and you can change it in the application settings.
To run a Ruby script use:
ruby name_of_script.rb
You should check out various resources and tutorials on getting started with rails.
As you say in your comment this is your first experience with Ruby on Rails, I think you should follow through chapter 1 and 2 (at least) of Ruby on Rails Tutorial. After that you should have a better understanding of how you start up a rails app and configure the DB. You also need a bunch of other libraries and software such as mysql from the sounds of it.
You should also read Getting Started with Rails. Section 4 covers how to start the default rails server.
Here is a guide on setting up a Rails environment for Windows, which is one of many guides, that shows you some of the needed steps to get a fully working environment.

Difference between "Redmine on Heroku" and "Installing Redmine" documentation

My intention is to install Redmine on Heroku.
On redmine.org, there are two docs that I came across:
http://www.redmine.org/projects/redmine/wiki/RedmineInstall http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Heroku.
I know the second doc is self-explanatory in its title but I want to know if I follow the first doc's instructions, would I be able to still deploy Redmine to Heroku. OR is it better that I follow the second doc's instructions?
A noob at this, any feedback would be appreciated. Thanks in advance.
==============
Following the Heroku specific instructions (step 5), I tried to run rake generate_secret_token using Ruby's CMD however I get back 'Please configure your config/database.yml first'. There are two related files in two different locations. C:\Users\\redmine\config AND from C:\Users\\Desktop\\redmine-2.5.1\config. Which database.yml do I use? The config file on the second path has only database.yml.example. Do I make the change there and save it as 'database.yml'? Or do I make the change in the first location, cd to the first location and run rake generate_secret_token?
Follow the Heroku-specific instructions. The first document explains how to install Redmine on a server that you have full (root) control over. It entails logging into the machine and running various commands to install software.
Heroku does not give you a full server instance in the way the first document requires. Instead, you work on your application on your own machine and push it from there to Heroku. Things like database setup are configured through Heroku addons. You do not get access to the filesystem, which is in fact read-only.
The first document wouldn’t work for installing on Heroku.

Downloaded project from Github, rails server won't start

Downloaded a project from Github and I am having issues getting the rails server to start. I ran the bundle install and am definitely in the right directory, is there anything that I've missed that you're supposed to do?
http://pastebin.com/rjhkQkZk
Run rails server. If there is another error, please provide more information:
Operating System
Rails Version
Log
Make sure you are at the root (directory) of the project you downloaded. And then try this command:
rails s
It would be really nice if we could learn what your log entries say.
In your terminal set the ruby source and go to the Root directory.
hit rails s or rails server
Stupid, stupid noob mistake - it's with sinatra not rails. Sorry to waste your time, guys.

Error: Rails command not found

I created a new Rails project in a directory, say Desktop (rails new project1). After that, I ran the following command:
rails server
Then, the project1 was running on localhost.
After that, I made another directory with name (project1) in another location. I copied all the files from the previous location to new location. After that, when I ran the following command:
rails server
I got the following error message:
Rails is not currently installed on this system.
But it is working in the previous directory. How do I solve this?
If you are totally new to Rails development and System administration it is rather complicated in the beginning. I recommend any kind of Rails tutorial to you for examply by Michael Hartl .
As Graeme McLean points out you somewhen understand that there is information about your environment needed to help you.
Most likely the requirements you need to be set up are not set up in the place you did copy your rails project as Pavan and Thaha kp pointed out.

How do I set up an old Ruby on Rails project on a new server?

I'm not a RoR programmer myself, but a good client of ours has sent a project their previous web team built and I need to get it up and running on their server.
The server uses cPanel and Ruby on Rails is already installed. I've created a project via the cPanel wizard and located the file tree via SSH.
Using SSH, I've tried to replace this file tree with the project I've been sent, but when I hit 'run' in cPanel, the application doesn't actually start (although the success message would indicate that it has).
If I leave the original cPanel-created application in place, I can run/stop no problem and the web interface at :12001 opens up just fine.
I assume there are either conflicts with RoR versions that I need to resolve, or there's simply more to it than just replacing the file tree? Again I'm not a RoR programmer and I'm having a hard time finding a migration guide that tells me anything other than "set up in cPanel and replace the files".
I'd very much appreciate either some genuinely useful links to RoR application setup/migration guides (ideally for cPanel) or a step-by-step answer please.
First, forget Cpanel for now. Try in one environment where you can control everything.
Try to know better the rails version used and the associated gem19s or plugin if from 2.x days. The ruby version is important too, only then you can start defining a plan.
I'm afraid you won't get a step-by-step answer, but I'm sure you can be pointed in the right direction by providing the requested information.
Simple questions: Do you have a Gemfile file at the top at your project? Do you have any plugins (stuff in vendor/plugins)?
Update:
With the Gemfile provided here are the required steps:
Install ruby (if you haven't install it using rvm. The version 1.9.3-x should be the safest.
Install rubygems
Install bundler
Go the project dir and run bundle install
run rake db:migrate (assure you have the database setup acording to config/database.yml
run rails s and check the logs and see if the server is up.
If after installing bundler, you don't have the bundle command in your path, you need to add this your .bash_profile:
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH

Resources