Indexing PDF documents using sunspot / solr seemed like a difficult task initially. There are a number of tutorials dealing with this topic but they seemed overly complicated. In the end, I decided the simplest way to go about providing search functionality for indexed PDF documents was to 1) parse the documents locally 2) input the raw PDF text into an ActiveRecord Object. 3) index the associated raw text field [...]
Read More
If you’ve recently loaded a new Rails 4 application to Heroku and your assets are missing (css, js, etc) – you’re not alone. Add the following lines to your production.rb (or staging.rb) environment configuration files: config.serve_static_assets = true config.assets.compile = true Then push the changes up to Heroku and you’re good to go.
Read More
If you attempt to deploy a new application to Heroku using Rails 4.0.0, with a default postgresql configuration in your gemfile, such as: gem ‘pg’ Then, heroku will assume you are requesting PG version 0.12.2. This causes errors. Instead, to avoid connection errors (timeout, undefined constant, etc), you need a more recent version: gem ‘pg’, ’0.15.1′
Read More
If you run into a situation where you’ve been developing an application in a live heroku development environment and have entered a substantial amount of live data that you don’t want to reenter into your live production environment, then connecting to your development instance’s database and retrieving the specific data you are interested in might help. To do this, you can use the following snippet within your production environment’s console: [...]
Read More
Ruby on Rails Scenario The easiest way to keep a Rails App from idling is to use New Relic Standard (free), in conjunction with their availability monitoring. You can do this in a couple of ways: Issue the following command with the Heroku Toolkit heroku addons:add newrelic:stark Or, login to your heroku account and provision the addon from there. Once the New Relic addon is provisioned, go to the new [...]
Read More
This post assumes you are processing background jobs on a development/production environment utilizing Redis and Resque. If you’re monitoring your local resque instance with resque-web, just run the following commands to change the resque-web’s redis reference to your production redis instance resque-web -K resque-web -r [your redis location] If you’re using RedisToGo, for instance, you can get the redis location by logging into your account.  If your account is through [...]
Read More
I wanted a simple way to push WordPress to Heroku.  It doesn’t get much simpler than this https://github.com/mhoofman/wordpress-heroku In regards to using your own custom domain name, the tutorial recommends using A records with a set of defined IP addresses.  Instead, I think the better approach is to use a CNAME record pointing to your Heroku App’s location.  You can find Heroku’s recommendation here: https://devcenter.heroku.com/articles/custom-domains#custom-subdomains Additionally, the tutorial doesn’t mention [...]
Read More