Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

J. Mark Locklear's Profile

GitHub User: marklocklear


Comments by J. Mark Locklear


FYI, I was getting an error when I ran the migration file that was asking to specify an extension version for hstore. Turns out I did not have the postgres contrib module installed. You need to that to add the hstore extension to the postgres db. On Ubuntu I did 'sudo apt-get install postgresql-contrib-9.1'.


Hey guys, two questions. First, can anyone point me to a good tutorial that would help with adding a 2nd application on the same server with a configuration like this. Second, lets say I wanted my app on Heroku to act as a staging app. Could you use a setup like this to pull from Heroku rather than Github?


I'm wondering if anyone has ideas on turning a custom page into a pdf. I have a search page. I have a custom action in my controller that looks like this..

` ruby
   def search
    from_date =[:from_date][:year].to_i, params[:from_date][:month].to_i, params[:from_date][:day].to_i).to_s(:db)
    to_date =[:to_date][:year].to_i, params[:to_date][:month].to_i, params[:to_date][:day].to_i).to_s(:db)
    @visits =, to_date, current_user)
      respond_to do |format|
        #format.html # show.html.erb
        format.pdf do
          pdf =
          pdf.text @visits
          send_data pdf.render

When I do this I get a "Completed 406 Not Acceptable". I've also tried to add a link_to to my view, and I get a different issue there. I've laid that out here. Any help appreciated.