New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on Heroku #186

Open
alecsGarza opened this Issue Sep 19, 2013 · 16 comments

Comments

Projects
None yet
4 participants
@alecsGarza

alecsGarza commented Sep 19, 2013

Hello,

We tried to follow up the guide on

http://blog.pageonex.com/2012/11/28/installing-your-own-pageonex-deployment-in-heroku/

with no much luck. The master and heroku branch are not installable; having problems with the nokogiri file.

Any suggestions?

Thanks

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca
Owner

numeroteca commented Sep 19, 2013

@rahulbot

This comment has been minimized.

Show comment
Hide comment
@rahulbot

rahulbot Sep 20, 2013

Collaborator

Sorry, but we don't have development time to support the Heroku install anymore. The application has progressed a long way since then, so even if it ran it doesn't have many of the features and bug fixes of the current version.

Collaborator

rahulbot commented Sep 20, 2013

Sorry, but we don't have development time to support the Heroku install anymore. The application has progressed a long way since then, so even if it ran it doesn't have many of the features and bug fixes of the current version.

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Sep 20, 2013

Any guide or recommendation has to how to install the current version on another web server?

Thanks

alecsGarza commented Sep 20, 2013

Any guide or recommendation has to how to install the current version on another web server?

Thanks

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Sep 21, 2013

Owner

I have included an installation guide in the wiki. I hope it helps.

Owner

numeroteca commented Sep 21, 2013

I have included an installation guide in the wiki. I hope it helps.

@nvjacobo

This comment has been minimized.

Show comment
Hide comment
@nvjacobo

nvjacobo Sep 22, 2013

Which SO are you using?

nvjacobo commented Sep 22, 2013

Which SO are you using?

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Sep 22, 2013

Owner

We use Ubuntu. Others have installed it in OS X as well.

Owner

numeroteca commented Sep 22, 2013

We use Ubuntu. Others have installed it in OS X as well.

@nvjacobo

This comment has been minimized.

Show comment
Hide comment
@nvjacobo

nvjacobo Sep 28, 2013

You can install directly Heroku with apt-get.

nvjacobo commented Sep 28, 2013

You can install directly Heroku with apt-get.

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Oct 1, 2013

Owner

@dcabo suggested to add these gems to the Gemfile:

gem 'rails_12factor'    # Heroku logging y servir assets (without this it doesn't serve images, css…)
gem 'thin'
gem 'nokogiri' 

Then you need to bundle install and push again to Heroku.

So I could deploy one instance of the last version of PageOneX in heroku http://pageonexnewtoheroku.herokuapp.com and it looks like it's working fine!

The option that didn't store the images locally, to avoid having to pay data storage at heroku, seems not be working any more to create the image composite of the display view, so I switched back to storing locally.

@alecsGarza and @nvjacobo how are your installations going, need help?

Owner

numeroteca commented Oct 1, 2013

@dcabo suggested to add these gems to the Gemfile:

gem 'rails_12factor'    # Heroku logging y servir assets (without this it doesn't serve images, css…)
gem 'thin'
gem 'nokogiri' 

Then you need to bundle install and push again to Heroku.

So I could deploy one instance of the last version of PageOneX in heroku http://pageonexnewtoheroku.herokuapp.com and it looks like it's working fine!

The option that didn't store the images locally, to avoid having to pay data storage at heroku, seems not be working any more to create the image composite of the display view, so I switched back to storing locally.

@alecsGarza and @nvjacobo how are your installations going, need help?

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Oct 6, 2013

Hi,

@dcabo, @numeroteca thanks for the update.

we managed to install it.

We included in the GemFile
ruby '1.9.3'

To let heroku know which ruby to use.

We then tried to run

heroku run rake scraping:kiosko_names --app

and got he following messages

Running `rake scraping:kiosko_names` attached to terminal... 
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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
rake aborted!
Don't know how to build task 'scraping:kiosko_names'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:142:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
(See full trace by running task with --trace)

alecsGarza commented Oct 6, 2013

Hi,

@dcabo, @numeroteca thanks for the update.

we managed to install it.

We included in the GemFile
ruby '1.9.3'

To let heroku know which ruby to use.

We then tried to run

heroku run rake scraping:kiosko_names --app

and got he following messages

Running `rake scraping:kiosko_names` attached to terminal... 
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/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
rake aborted!
Don't know how to build task 'scraping:kiosko_names'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:142:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
(See full trace by running task with --trace)
@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Oct 6, 2013

Owner

Try running scraping:update_media instead.

rake scraping:kiosko_names has been deprecated in favor of rake scraping:update_media
You have to follow the updated instructions at https://github.com/numeroteca/pageonex/wiki#installation-guide, forget about the blog post you mentioned at the beginning of this thread.

You can see where the rakes are defined at /lib/tasks/scraping.rake

I didn't need to include ruby '1.9.3' to make PageOneX work in Heroku.

Owner

numeroteca commented Oct 6, 2013

Try running scraping:update_media instead.

rake scraping:kiosko_names has been deprecated in favor of rake scraping:update_media
You have to follow the updated instructions at https://github.com/numeroteca/pageonex/wiki#installation-guide, forget about the blog post you mentioned at the beginning of this thread.

You can see where the rakes are defined at /lib/tasks/scraping.rake

I didn't need to include ruby '1.9.3' to make PageOneX work in Heroku.

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Oct 7, 2013

@numeroteca Thanks, rake scraping:update_media worked great.

For production deployment should we run anything more than

rake db:migrate

after we the change the variable RACK_ENV and push again to heroku?

we added a ClearDB MySQL Database Ignite addon to the app

Best

alecsGarza commented Oct 7, 2013

@numeroteca Thanks, rake scraping:update_media worked great.

For production deployment should we run anything more than

rake db:migrate

after we the change the variable RACK_ENV and push again to heroku?

we added a ClearDB MySQL Database Ignite addon to the app

Best

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Oct 7, 2013

Owner

You need to db:migate to create all the tables in the database (before scraping:update_media).

I am not sure now where is the production setting, I think you are right and it is the RACK_ENV variable.

Let us know how it works!

Owner

numeroteca commented Oct 7, 2013

You need to db:migate to create all the tables in the database (before scraping:update_media).

I am not sure now where is the production setting, I think you are right and it is the RACK_ENV variable.

Let us know how it works!

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Oct 7, 2013

We changed the variable in the file .env and pushed to heroku again.

However, we are not sure if by changing RACK_ENV=development to RACK_ENV=production is enough to work on the production mode as stated in the wiki

"Note: You will need to have postgresSQL installed for the development environment, and mySQL for production environment. "

We followed the instructions from https://devcenter.heroku.com/articles/cleardb to work with the mysql database (rake db:migrate and rake scraping:update_media worked on the mysql database)

alecsGarza commented Oct 7, 2013

We changed the variable in the file .env and pushed to heroku again.

However, we are not sure if by changing RACK_ENV=development to RACK_ENV=production is enough to work on the production mode as stated in the wiki

"Note: You will need to have postgresSQL installed for the development environment, and mySQL for production environment. "

We followed the instructions from https://devcenter.heroku.com/articles/cleardb to work with the mysql database (rake db:migrate and rake scraping:update_media worked on the mysql database)

@numeroteca

This comment has been minimized.

Show comment
Hide comment
@numeroteca

numeroteca Oct 8, 2013

Owner

In which point is the process failing? and how?
Did you follow https://devcenter.heroku.com/articles/multiple-environments instructions?

Owner

numeroteca commented Oct 8, 2013

In which point is the process failing? and how?
Did you follow https://devcenter.heroku.com/articles/multiple-environments instructions?

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Oct 9, 2013

@numeroteca we will take a look into link

However we are having problems in seen the thread images and found the following

"It turn out that only images in the commit and pushed to heroku are kept, example logo or icon used in the apps. Uploaded images will be removed with each push to heroku, clearly images uploaded via paperclip fall into the latter category.

Solution is to use a 3rd party storage, like Amazon Simple Storage Service. "

Did you have any issues saving the images?

Thanks

alecsGarza commented Oct 9, 2013

@numeroteca we will take a look into link

However we are having problems in seen the thread images and found the following

"It turn out that only images in the commit and pushed to heroku are kept, example logo or icon used in the apps. Uploaded images will be removed with each push to heroku, clearly images uploaded via paperclip fall into the latter category.

Solution is to use a 3rd party storage, like Amazon Simple Storage Service. "

Did you have any issues saving the images?

Thanks

@alecsGarza

This comment has been minimized.

Show comment
Hide comment
@alecsGarza

alecsGarza Oct 9, 2013

We found this

https://devcenter.heroku.com/articles/paperclip-s3

this would imply modifying

app/models/image.rb
app/controllers/images_controller.rb
lib/image_compositor.rb

correct?

alecsGarza commented Oct 9, 2013

We found this

https://devcenter.heroku.com/articles/paperclip-s3

this would imply modifying

app/models/image.rb
app/controllers/images_controller.rb
lib/image_compositor.rb

correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment