This is an easy way to set up your own version of PageOneX in Heroku, and make the process easier than in the last post about this topic.
Heroku is a free hosting service to test web apps. The free service allows you to run your app with a limit in its data base.
If something is not clear, ask in the comments. We’ll updating this post.
You’ll need:
- Git installed in your computer
- an account in Heroku
- install the heroku toolbelt
Let’s say you want to create your app named “pageonextesterx”. It will have the url: http://pageonextesterx.herokuapp.com. “pageonextesterx” must be an unique name, no other app should have your chosen name. So change it!
Run the following commands in a terminal (tested with ubuntu)
git clone git@heroku.com:pageonex.git
It clones (downloads) the files for the deployment. You can also download them from: http://pageonex.com/pageonextester-heroku-1.0.1.zip
Create your app at Heroku:
heroku create pageonextesterx
For this you’ll have had to create your own Heroku account before and choose a name that no one has taken before.
Go into the created folder.
cd pageonex
Edit the git config file at .git/config
nano .git/config
or use
gedit .git/config
The file will open in the “nano” editor or “gedit” editor. You can also go to the hidden folder .git and open the “config” file.
Once inside you have to change “git@heroku.com:pageonex.git” by “git@heroku.com:pageonextesterx.git”. This will tell Git where to upload your files. If you try to upload (push) to “git@heroku.com:pageonex.git” you will not have the rights to do it.
Now you are ready to upload your app:
git push heroku master
You will need to upload your ssh key to heroku. You can find it (in ubuntu) at /home/.ssh/id_rsa.pub, and have to copy paste in your heroku account settings page.
To view hidden files you have to activate view of hidden files.
To view hidden files you have to activate view of hidden files.
It will upload your files to your deployment. Now you need to run more commands:
heroku run rake db:migrate --app pageonextesterx
We are adding “–app pageonextesterx” is to specify which of the apps that you have it’s being used.
heroku run rake scraping:kiosko_names --app pageonextesterx
Go to http://pageonextesterx.herokuapp.com. You are ready to go!
Note: We hope to have soon our own deployment running at pageonex.com, so you don’t have to install your own. We are providing you with this manual to help run your own deployment. Running it in your computer is more difficult than doing it remotely in eroku, as you do no have to install rails, ruby or the gems associated with the project.
7 replies on “The easy way to run your own PageOneX deployment in heroku”
[…] A “How to manual” set up your own online version of PageOneX in Heroku. Check it in the PageOneX develoment blog. […]
hello
the .zip link is dead.
Is the github version suitable for heroku?
Cheers
found the heroku branch on github
Thanks
Sorry about the dead link.
I haven’t tested it in Heroku recently but it should work. To make a light installation (and not download the images) check in the wiki https://github.com/numeroteca/pageonex/wiki#switch-between-embedding-image-files-from-kioskonet-or-storing-locally:
Change value to false at config/initializers/application.rb:
Pageonex::Application.config.use_local_images = true
Check the wiki Developer section for more updated details on how t odeploy it.
If the most recent version doesn’t work in heroku, please report here, and I can rescue an old one that works with the instructions posted in this post.
We tried with the origin/master branch and the origin/heroku branch with no luck.
We get the following message
heroku run rake db:migrate --app d4pageonex --trace
Running `rake db:migrate --trace` attached to terminal... up, run.5808
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from at /app/Rakefile:7)
rake aborted!
cannot load such file -- nokogiri
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
/app/lib/tasks/scraping.rake:3:in `'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.2/lib/rails/engine.rb:425:in `block in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.2/lib/rails/engine.rb:425:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.2/lib/rails/engine.rb:425:in `load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.2/lib/rails/application.rb:145:in `load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/Rakefile:7:in `'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-0.9.2.2/bin/rake:33:in `'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `'
I tried to make a new install in heroku with the old version of PageOneX, download pageonexonheroku.zip, which is a clone of what was running in http://pageonextester5.herokuapp.com/ and http://pageonextester6.herokuapp.com/, the former alpha site of PageOneX.
The installation worked well.
The result is this: http://pageonextesterxxx.herokuapp.com/, which seems to fail in the javascript loading and css from bootstrap, among other things, and it is not usable. I do not know what is happening.
I also tried to install the last PageOneX version in Heroku and I ended up having the same problem with “nokogiri” gem that you report, and none of the answers that I found worked for me. I will ask in the PageOneX developers list to see if someones knows the answer.
Hello,
Thanks for the update.
I just opened an issue on github
https://github.com/numeroteca/pageonex/issues/186