Difference between "Redmine on Heroku" and "Installing Redmine" documentation - ruby-on-rails

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.

Related

Following tutorial for installing Ruby on Rails for Heroku. Currently stuck

very new to all this. I am following a tutorial to get Heroku running through ruby on rails.
I have Microsoft Windows so I am currently following Heroku's official tutorial and am stuck here
I installed PostgresSQL 10.1 using windows installer x86-64 and have noted my login information for Postgres.
However, I do not understand this part:
Remember to update your PATH environment variable to add the bin
directory of your Postgres installation. The directory will be similar
to this: C:\Program Files\PostgreSQL\<VERSION>\bin. If you forget to
update your PATH, commands like heroku pg:psql won’t work.
The closest thing I could find to an explanation and tutorial was this Java site.
I went inside Enviromental Variables and set the system path to: C:\Program Files\PostgreSQL\10\bin
However, when I tried testing it out by typing in heroku pg:psql, it said no app specified so I'm unsure if I did it correctly or not.
Also, the next tutorial step is:
Open the config\database.yml file and set the username and password
for your local (development) database. Look for these line:
I searched and I have no such file on my computers. Needless to say, I'm stumped. Any assistance to progress through the tutorial is appreciated. Thank you.
regarding your first error, the problem is that you are not specifying for which app you want to open the database cli (psql). Hopefully, the solution is easy:
heroku pg:psql --app app_name
# or
heroku pg:psql -a app_name
About the second question, the tutorial assumes that you have already created an application.
If you go to the root path of your project, you will find some subfolders such as app, config, db, lib, public, tmp, vendor.. Here you will find config\database.yml.

Many problems with deploying a rails application to Elastic Beanstalk

I'm at a breaking point with trying to get a rails application deployed to EB. I cannot user heroku for dependency reasons so I'm trying out AWS. The ruby/rails tutorials online all are very clear in setting up an environment, but I am met with many challenges, and at this point I'm starting to think it's because of Amazon's service and not my configuration.
Lets say I start with something very simple, I run
rails new
I start of with a barebones rails app, and I add the necessary routes and index.html.erb file to say hello word. I run
git init && git add . && git commit -m "hello world"
eb init
I run through the necessary steps, I've tried creating a 32 and 64 bit ubuntu instances with ruby 1.9.3 (Which is what my local environment is set up as), I dont set up RDS, and then run
eb start
which prompts me to deploy my latest git commit, I say yes, and it deploys!
Good news? Not so much, Yes my url given by EB does say Hello World, but if at ANY point I try to deploy new code, lets say a change to the gemfile, and there is an error in building my gemfile.. the environment completely blocks me out to the point where.
I cannot access any logs, and If I try, the env goes into a grey state, and reboots
I cannot redeploy any previous git commit, the env just spends 10 minutes and times out
I'm getting frustrated having to rebuild an ENTIRE environment every time there is a slight error in the code.
In general, I'm looking for an alternative to heroku, from which I can deploy changes from the command line. I don't think my question is phrased well enough for anyone to spot out exactly what I'm doing wrong - If I am even doing something wrong. If there are any best-practices with deploying to EB.. please let me know. Thanks!
What size instance are you using? I've found that trying to use a micro instance doesn't work as it runs out of memory when building any native extensions.
Try using a t2.small instance at a minimum.

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

Grab Ruby on Rails files and install on local machine

general question that can be used in many different situations, so I thought it would be interesting to ask.
I'm semi new to Ruby and am learning from Treehouse. I am doing the social media site project, and am about half way through.
I was hoping to set up a separate installation from the source files they give you, of the completed site, to do a simple compare and contrast, and really I am just curious as to what the final product is gonna be like.
My question is, is there an easy way to just grab their files, install all the gems and dependencies and run the rails server. If I just try to run the server on the folder, I get a bunch of errors about Gems not being installed and such, which is expected.
If anyone has a process they use when doing things like migrated entire environments from one location to another, it would be appreciated!
Go to project directory.
Install all of the required Gems by executing
bundle install
Create database by executing
rake db:create
Then migrate the database by executing
rake db:migrate
And finally run the application using
rails s
If you have cloned their repository, or copied the files to a folder, try running
bundle install
from the command line

changing to a new computer

OK, so I have been working through the ruby on rails tutorial by Hartl. I've begun the demo_app. I want to change computers. I downloaded ruby and ruby on rails to my new windows 8 machine. I then copied the folder with all my ruby on rails apps from my old computer to my new one. I thought everything would just work. But, no! I had to run bundle install before I could even start the rails server from within the sample_app. After that things seem to work. But I don't know why I had to do that. Can anyone explain?
Now, I'm not sure what will happen if I install github and heroku on the new machine. I think I already have a new ssh key for one thing. And so I have no idea if I do download both of those if I just continue with my development of the demo_app or if everything is going to be screwed up. Any advice would be appreciated. Yes, I'll read the git book, but I was hoping I could get going with my rails stuff in the meantime if there is some easy way to make the transition to the new machine. Or should I just stick to the old machine until I've learned a lot more about git?
Gems are installed in your default system location for gems, not in your projects. You have copied your project folder but not the gems, that is why you have to bundle install again.
What bundle install does is it installs the required gems by your application to your computer. So naturally if you change the machine, gems that installed to your previous computer is not there in your new machine. That is why you have to run bundle install again.
if you want to install your gems inside the project directory (so that if you change the machines it will not effect you) do the following
bundle install
check this out for more info
HTH
After installing Rails you're halfway there.
Like the other answers say you need a bundle install.
The next step (I would suggest) is the database-server. But you said your app is already working (?). At this point you should be able starting your web using a server like Webrick.
I think the easies way to set up Git, is installing git, set it up (like email and name and this stuff) and then cloning the repository to your new pc (with git clone ...). Of course you can add your new Ssh-key to Github, to have easier accces to GitHub.
I can't tell you so much about heroku because I've never used it. But if you've set up your deployment it should work like before, because (I guess) it also gets the code from github.

Resources