Heroku, Taps and Ubuntu

After beavering away on a Rails app for the last little while I wanted to put it up somewhere so the rest of the world can see it. I signed up with Heroku since they specialise in hosting Rails apps. Their database setup is kind of confusing. It turns out that they totally ignore your database configuration (database.yml is not used.) They just use the schema.rb to create the database that your app needs in their Postgres database. You just run your rake task to set it up. Thats pretty cool, but there is something cooler; can copy your entire local database with data and everything over to their server with the command:

heroku db:push

The only problem for me was that on Ubuntu (jaunty) the command failed telling me that I needed to intall Taps. More aggravating still was the fact that my attempt to install Taps also failed because its dependent on Sqlite3:

mike@jauntyjackalope:~$ sudo gem install taps
[sudo] password for mike:
Building native extensions.  This could take a while…
ERROR:  Error installing taps:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb install taps
checking for fdatasync() in -lrt… yes
checking for sqlite3.h… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/bin/ruby1.8
–with-sqlite3-dir
–without-sqlite3-dir
–with-sqlite3-include
–without-sqlite3-include=${sqlite3-dir}/include
–with-sqlite3-lib
–without-sqlite3-lib=${sqlite3-dir}/lib
–with-rtlib
–without-rtlib

Gem files will remain installed in /var/lib/gems/1.8/gems/sqlite3-ruby-1.2.5 for inspection.
Results logged to /var/lib/gems/1.8/gems/sqlite3-ruby-1.2.5/ext/sqlite3_api/gem_make.out

This was pretty annoying. Worse still installing sqlite3 didn’t fix it. It took some googling to figure out what needed to be installed to make Taps and therefore Heroku happy. It turns out that sqlite.h lives in the package libsqlite3-dev:

mike@jauntyjackalope:~$ sudo aptitude install libsqlite3-dev
mike@jauntyjackalope:~$ sudo aptitude install libsqlite3-doc

mike@jauntyjackalope:~$ sudo gem install taps
Building native extensions.  This could take a while…
Successfully installed sqlite3-ruby-1.2.5
Successfully installed taps-0.2.19
2 gems installed

mike@jauntyjackalope:~/dexterchief$ heroku db:push
Auto-detected local database
Sending schema
Sending data
6 tables, 53 records
comments:      100% |==========================================| Time: 00:00:01
posts:         100% |==========================================| Time: 00:00:01
roles:         100% |==========================================| Time: 00:00:00
roles_users:   100% |==========================================| Time: 00:00:00
schema_migrat: 100% |==========================================| Time: 00:00:01
users:         100% |==========================================| Time: 00:00:00
Sending indexes
Resetting sequences

Finally!

About these ads

22 thoughts on “Heroku, Taps and Ubuntu

  1. Some help if someone has still the issue and read this post…
    I had also to execute the next command to make it work (to install Taps) :
    sudo aptitude install ruby-dev

  2. I use ubuntu 8.10 and have the same problem when install taps.
    I tried your commands, not working. Would you have a look my log file please?

    umart01@ubuntu01:~/rorproj/demo_ap$ sudo aptitude install libsqlite3-dev
    [sudo] password for umart01:
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Writing extended state information… Done
    The following NEW packages will be installed:
    libsqlite3-dev
    The following packages will be REMOVED:
    asciidoc{u} cvs{u} docbook-dsssl{u} docbook-utils{u} docbook-xsl{u}
    docbook-xsl-doc-html{u} dvipdfmx{u} gettext{u} jadetex{u} latex-beamer{u}
    latex-xcolor{u} libcurl4-gnutls-dev{u} libdbd-sqlite3-perl{u}
    libgcrypt11-dev{u} libgnutls-dev{u} libgpg-error-dev{u} libidn11-dev{u}
    libldap2-dev{u} libostyle1c2{u} libsgmls-perl{u} libsp1c2{u}
    libsvn-perl{u} libtasn1-3-dev{u} lmodern{u} openjade{u} pgf{u} prosper{u}
    sgmlspl{u} sp{u} tcl8.5{u} tex-common{u} texlive-base{u}
    texlive-base-bin{u} texlive-base-bin-doc{u} texlive-common{u}
    texlive-doc-base{u} texlive-fonts-recommended{u}
    texlive-fonts-recommended-doc{u} texlive-generic-recommended{u}
    texlive-latex-base{u} texlive-latex-base-doc{u}
    texlive-latex-recommended{u} texlive-latex-recommended-doc{u}
    texlive-pstricks{u} texlive-pstricks-doc{u} tipa{u} xmlto{u}
    0 packages upgraded, 1 newly installed, 47 to remove and 0 not upgraded.
    Need to get 329kB of archives. After unpacking 320MB will be freed.
    Do you want to continue? [Y/n/?] y
    WARNING: untrusted versions of the following packages will be installed!

    Untrusted packages could compromise your system’s security.
    You should only proceed with the installation if you are certain that
    this is what you want to do.

    libsqlite3-dev

    Do you want to ignore this warning and proceed anyway?
    To continue, enter “Yes”; to abort, enter “No”: Yes
    Writing extended state information… Done
    Err http://us.archive.ubuntu.com intrepid-updates/main libsqlite3-dev 3.5.9-3ubuntu1
    404 Not Found [IP: 91.189.88.30 80]
    (Reading database … 209217 files and directories currently installed.)
    Removing asciidoc …
    Removing cvs …
    Removing docbook-utils …
    Removing docbook-dsssl …
    Removing xmlto …
    Removing docbook-xsl …
    Removing docbook-xsl-doc-html …
    Removing dvipdfmx …
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN…
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.
    Removing gettext …
    Removing jadetex …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf’.
    This may take some time… done.
    Removing latex-beamer …
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN…
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.
    Removing pgf …
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN…
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.
    Removing latex-xcolor …
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN…
    mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVE…
    mktexlsr: Updating /var/lib/texmf/ls-R…
    mktexlsr: Done.
    Removing libcurl4-gnutls-dev …
    Removing libdbd-sqlite3-perl …
    Removing libgnutls-dev …
    Removing libgcrypt11-dev …
    Removing libgpg-error-dev …
    Removing libidn11-dev …
    Removing libldap2-dev …
    Removing openjade …
    Removing libostyle1c2 …
    Removing sgmlspl …
    Removing libsgmls-perl …
    Removing sp …
    Removing libsp1c2 …
    Removing libsvn-perl …
    Removing libtasn1-3-dev …
    Removing lmodern …
    No CIDSupplement specified for ZenHei, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular, defaulting to 0.
    No CIDSupplement specified for Dotum-Bold, defaulting to 0.
    No CIDSupplement specified for KochiMincho-Regular, defaulting to 0.
    No CIDSupplement specified for BousungEG-Light-GB, defaulting to 0.
    No CIDSupplement specified for Batang-Regular, defaulting to 0.
    No CIDSupplement specified for Dotum-Regular, defaulting to 0.
    No CIDSupplement specified for ZenHei-CNS, defaulting to 0.
    No CIDSupplement specified for ShanHeiSun-Light, defaulting to 0.
    No CIDSupplement specified for UMingCN, defaulting to 0.
    No CIDSupplement specified for Batang-Bold, defaulting to 0.
    No CIDSupplement specified for KochiGothic-Regular-JaH, defaulting to 0.
    No CIDSupplement specified for UKaiCN, defaulting to 0.
    Updating fontconfig cache for /usr/share/texmf/fonts/type1/public/lm
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Running ‘updmap-sys’.
    This may take some time… done.
    Removing prosper …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf’.
    This may take some time… done.
    Removing tcl8.5 …
    Removing texlive-pstricks-doc …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-pstricks …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-latex-recommended-doc …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-latex-recommended …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-latex-base-doc …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing tipa …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf’.
    This may take some time… done.
    Running ‘updmap-sys’.
    This may take some time… done.
    Removing texlive-latex-base …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Running ‘updmap-sys’.
    This may take some time… done.
    Removing texlive-generic-recommended …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-fonts-recommended-doc …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-fonts-recommended …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Running ‘updmap-sys’.
    This may take some time… done.
    Removing texlive-base …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Running ‘fmtutil-sys –all’.
    This may take some time… done.
    Running ‘updmap-sys’.
    This may take some time… done.
    Removing texlive-doc-base …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-base-bin-doc …
    Running ‘mktexlsr /usr/share/texmf /var/lib/texmf /usr/share/texmf-texlive’.
    This may take some time… done.
    Removing texlive-base-bin …
    Removing texlive-common …
    Removing tex-common …
    Processing triggers for man-db …
    Processing triggers for doc-base …
    Processing 13 removed doc-base file(s)…
    Registering documents with scrollkeeper…
    Processing triggers for libc6 …
    ldconfig deferred processing now taking place
    E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/s/sqlite3/libsqlite3-dev_3.5.9-3ubuntu1_amd64.deb: 404 Not Found [IP: 91.189.88.30 80]
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Writing extended state information… Done

    umart01@ubuntu01:~/rorproj/demo_ap$
    umart01@ubuntu01:~/rorproj/demo_ap$ sudo aptitude install libsqlite3-doc
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Couldn’t find any package whose name or description matched “libsqlite3-doc”
    Couldn’t find any package whose name or description matched “libsqlite3-doc”
    No packages will be installed, upgraded, or removed.
    0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0B of archives. After unpacking 0B will be used.
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done

    umart01@ubuntu01:~/rorproj/demo_ap$

    umart01@ubuntu01:~/rorproj/demo_ap$ sudo gem install taps
    Building native extensions. This could take a while…
    ERROR: Error installing taps:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb
    checking for sqlite3.h… no
    sqlite3.h is missing. Try ‘port install sqlite3 +universal’
    or ‘yum install sqlite3-devel’ and check your shared library search path (the
    location where your sqlite3 shared library is located).
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.

    Provided configuration options:
    –with-opt-dir
    –without-opt-dir
    –with-opt-include
    –without-opt-include=${opt-dir}/include
    –with-opt-lib
    –without-opt-lib=${opt-dir}/lib
    –with-make-prog
    –without-make-prog
    –srcdir=.
    –curdir
    –ruby=/usr/bin/ruby1.8
    –with-sqlite3-dir
    –without-sqlite3-dir
    –with-sqlite3-include
    –without-sqlite3-include=${sqlite3-dir}/include
    –with-sqlite3-lib
    –without-sqlite3-lib=${sqlite3-dir}/lib

    Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.2 for inspection.
    Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.2/ext/sqlite3/gem_make.out
    umart01@ubuntu01:~/rorproj/demo_ap$

    ——————– not working, try another go ————————

    umart01@ubuntu01:~/rorproj/demo_ap$ sudo aptitude install ruby-dev

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    The following NEW packages will be installed:
    ruby-dev
    0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 5114B of archives. After unpacking 32.8kB will be used.
    WARNING: untrusted versions of the following packages will be installed!

    Untrusted packages could compromise your system’s security.
    You should only proceed with the installation if you are certain that
    this is what you want to do.

    ruby-dev

    Do you want to ignore this warning and proceed anyway?
    To continue, enter “Yes”; to abort, enter “No”: Yes
    Writing extended state information… Done
    Get:1 http://us.archive.ubuntu.com intrepid/main ruby-dev 4.2 [5114B]
    Fetched 5114B in 1s (3824B/s)
    Selecting previously deselected package ruby-dev.
    (Reading database … 192557 files and directories currently installed.)
    Unpacking ruby-dev (from …/archives/ruby-dev_4.2_all.deb) …
    Setting up ruby-dev (4.2) …
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Reading extended state information
    Initializing package states… Done
    Writing extended state information… Done

    umart01@ubuntu01:~/rorproj/demo_ap$ sudo gem install taps

    Building native extensions. This could take a while…
    ERROR: Error installing taps:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.8 extconf.rb
    checking for sqlite3.h… no
    sqlite3.h is missing. Try ‘port install sqlite3 +universal’
    or ‘yum install sqlite3-devel’ and check your shared library search path (the
    location where your sqlite3 shared library is located).
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.

    Provided configuration options:
    –with-opt-dir
    –without-opt-dir
    –with-opt-include
    –without-opt-include=${opt-dir}/include
    –with-opt-lib
    –without-opt-lib=${opt-dir}/lib
    –with-make-prog
    –without-make-prog
    –srcdir=.
    –curdir
    –ruby=/usr/bin/ruby1.8
    –with-sqlite3-dir
    –without-sqlite3-dir
    –with-sqlite3-include
    –without-sqlite3-include=${sqlite3-dir}/include
    –with-sqlite3-lib
    –without-sqlite3-lib=${sqlite3-dir}/lib

    Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.2 for inspection.
    Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.2/ext/sqlite3/gem_make.out
    umart01@ubuntu01:~/rorproj/demo_ap$

  3. i have downloaded the Taps,but when i try to install it,it says sudo command not found..or gem command not found…Is anything wrong with the path..can you help me with this…execuse me if am so amateaur!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s