DISQUS

DISQUS Hello! Josh Kim dot Org is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

  • Subscribe

  • Community

  • Top Commenters

  • Popular Threads

  • Recent Comments

    • I hate Comcast too. They really try to make it difficult for you to downgrade their service. When I called their 800 number late one night, I went through all their options and finally selected...

      4 months ago by Dan

      in Why I Continue To Not Like Comcast

    • <p>Well, I think you're just succumbing to your "extreme" tendencies. Two or three feeds are fine. Just draw the line there.</p>

      4 months ago by JS

      in CHANGELOG: The Ads

    • &lt;p&gt;There&#39;s something good about having a separate blog for the more &quot;personal&quot; posts, but whenever I try to draw that line, I end up getting confused. Why not go all out and...

      4 months ago by jk

      in CHANGELOG: The Ads

    • &lt;p&gt;Sigh, the fixed focus of the iPhone camera...&lt;/p&gt; &lt;p&gt;I don&#39;t pay too much attention about the background object. I&#39;m not the camera guy here, heh.&lt;/p&gt;...

      4 months ago by jk

      in Crunk Energy Drink

    • &lt;p&gt;Wondering if you&#39;ve thought about doing different &quot;editions.&quot; I.e., different feeds for the different types of posts you write. You always seem a bit apprehensive about...

      4 months ago by JS

      in CHANGELOG: The Ads

Jump to original thread »
Author

PostgreSQL, Ruby, and Rails: I Quit

Started by joshkim · 8 months ago

This was supposed to go out last Saturday, but my blog took precedence. Oh, that, and Fable 2. Shh.

If you’ve somehow found this post in search of an answer, I have nothing but a rant for you. If the post at Robby on Rails did not work… you’re out of ... Continue reading »

24 comments

  • Hey there... sorry to hear that you had some troubles. I am planning to post a new version of my post shortly. Here are some of my notes from doing a full install last week with my new MacBook Pro.

    * http://gist.github.com/17502

    Good luck!
  • Hey there... sorry to hear that you had some troubles. I am planning to post a new version of my post shortly. Here are some of my notes from doing a full install last week with my new MacBook Pro.


    * http://gist.github.com/17502



    Good luck!
  • If that can help, I find the solution for ruby-pg. You must specify the adapter in config/database.yml at:
    adapter:postgresql

    That it! No more complain by Activerecord...

    Thanks
  • You're wrong Carl. I saw this "solution" as well online (I'm having the same problem), and I did originally have it set to "postgres", which was wrong. But even after changing it to "postgresql", I get the same type of error. Actually, with adapter set to postgres, I get this error:

    "Please install the postgres adapter: `gem install activerecord-postgres-adapter` (no such file to load -- active_record/connection_adapters/postgres_adapter)"

    When it's set correct to "postgresql", I get this error:

    Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (no such file to load -- pg)

    I've tried both the ruby-pg and postgres gems, to no avail. Any help would be appreciated.
  • Did you try the gist that robby posted? I haven't had a chance to, but
    it looks like it *may* work.

    My solution was just to go MySQL and worry about integration with
    PostgreSQL later, or maybe have that magic happen on the production
    server, which has Ubuntu installed.
  • Thanks for the reply joshkim.

    Well, all that's being done there in the gist to do with this is "sudo gem install postgres", which is sorta obvious. I don't think the problem is with the gem, though I've tried uninstalling and installing a few times, and tried the other ruby-pg gem too. Robby doesn't have the same error I do. The error shows up when doing a rake command to create the database, and occurs for others when trying a rake db migration command.

    I think this error only shows up with the latest rails, because I've been using postgresql on my laptop with rails 2.1.1 for a while. But it messes up on my server, which has rails 2.2.2 installed. The problem doesn't seem to be with the gem, but with activerecord itself. I don't know nearly enough about rails to begin trying to solve it though.

    I guess I may switch to mysql for now myself, just to get things working, but that isn't really a solution to me.
  • Yeah, same here. I started poking around in rails to see how I could
    fix it, but I gave up after gobs and gobs of time spent on it. I also
    remember it working in 2.1, because I was working on another rails
    project back then... but something must have changed with 2.2.
  • If that can help, I find the solution for ruby-pg. You must specify the adapter in config/database.yml at:
    adapter:postgresql



    That it! No more complain by Activerecord...



    Thanks
  • Take a look at my comments here:

    http://nachbar.name/blog/2008/11/28/rails-and-p...
  • You're wrong Carl. I saw this "solution" as well online (I'm having the same problem), and I did originally have it set to "postgres", which was wrong. But even after changing it to "postgresql", I get the same type of error. Actually, with adapter set to postgres, I get this error:


    "Please install the postgres adapter: `gem install activerecord-postgres-adapter` (no such file to load -- active_record/connection_adapters/postgres_adapter)"



    When it's set correct to "postgresql", I get this error:



    Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (no such file to load -- pg)



    I've tried both the ruby-pg and postgres gems, to no avail. Any help would be appreciated.
  • Did you try the gist that robby posted? I haven't had a chance to, but
    it looks like it *may* work.



    My solution was just to go MySQL and worry about integration with

    PostgreSQL later, or maybe have that magic happen on the production

    server, which has Ubuntu installed.
  • Thanks for the reply joshkim.


    Well, all that's being done there in the gist to do with this is "sudo gem install postgres", which is sorta obvious. I don't think the problem is with the gem, though I've tried uninstalling and installing a few times, and tried the other ruby-pg gem too. Robby doesn't have the same error I do. The error shows up when doing a rake command to create the database, and occurs for others when trying a rake db migration command.



    I think this error only shows up with the latest rails, because I've been using postgresql on my laptop with rails 2.1.1 for a while. But it messes up on my server, which has rails 2.2.2 installed. The problem doesn't seem to be with the gem, but with activerecord itself. I don't know nearly enough about rails to begin trying to solve it though.



    I guess I may switch to mysql for now myself, just to get things working, but that isn't really a solution to me.
  • Yeah, same here. I started poking around in rails to see how I could
    fix it, but I gave up after gobs and gobs of time spent on it. I also

    remember it working in 2.1, because I was working on another rails

    project back then... but something must have changed with 2.2.
  • i got this setup working

    postgres 8.3.5
    nb 6.5 ruby
    postgres-pr 0.5.0

    there are instructions on a blog on the dzone site, by some indian guy, it definitely works

    you need to create the db before working with it from nb, once its created, migrations do work, but for some reason the inital create:db doesnt work.
  • Mustafá, I woud like to find the 'blog on the dzone site, by some indian guy' Could you tel us the url
  • Yeah Mustafa.. the url would've been a cool addition to your comment..
  • you folks want to be spoon-fed, hmmm i dunno, here you go

    http://blogs.sun.com/jkshah/entry/postgresql_an...
  • argh thats what i get for rushing my reply

    heres the correct url

    http://netbeans.dzone.com/news/rails-and-postgr...
  • i got this setup working


    postgres 8.3.5

    nb 6.5 ruby

    postgres-pr 0.5.0



    there are instructions on a blog on the dzone site, by some indian guy, it definitely works



    you need to create the db before working with it from nb, once its created, migrations do work, but for some reason the inital create:db doesnt work.
  • Mustafá, I woud like to find the 'blog on the dzone site, by some indian guy' Could you tel us the url
  • Yeah Mustafa.. the url would've been a cool addition to your comment..
  • you folks want to be spoon-fed, hmmm i dunno, here you go


    http://blogs.sun.com/jkshah/entry/postgresql_an...
  • argh thats what i get for rushing my reply


    heres the correct url



    http://netbeans.dzone.com/news/rails-and-postgr...
  • I've done a couple of rails installs now on laptops and found myself in the exact same situation as you when installing on a new box -- real headscratcher. My problem was this: I'd installed rubygems via macports but neglected to install a fresh copy of rake via rubygems, which meant that when doing a rake db:migrate, it would find OS X's native rubygems. I only figured this out because script/server (which relies on the ruby binary) was working where rake was not.


    A 'gem install rake' (and a new terminal window to clear the bash path cache -- try saying that out loud) fixed me right up.


    If this command doesn't return three binaries in the same directory for you, you might be in the same boat:


    $ which ruby rake gem


    -john

Add New Comment

Returning? Login