I downloaded the latest Ruby stack virtual machine (bitnami-rubystack-3.2.5-0-ubuntu-12.04) and, while I can run an existing app that uses SQLite, I get an error when I run "rails new" (e.g., rails new test_app). I can create a new Rails app by passing "-d mysql" to rails new, however.
The error happens during the "bundle install" portion of creating the app and I've included the details below:
Installing sqlite3 (1.3.6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-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:
Gem files will remain installed in /home/bitnami/.bundler/tmp/2940/gems/sqlite3-1.3.6 for inspection.
Results logged to /home/bitnami/.bundler/tmp/2940/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
An error occured while installing sqlite3 (1.3.6), and Bundler cannot continue.
Make sure that
gem install sqlite3 -v '1.3.6' succeeds before bundling.
This gem requires to be compiled. If you are going to use MySQL, you can run the bundle install command without the sqlite option: "bundle install --without sqlite"
The problem is, "bundle install" is called automatically at the end of the "rails new" process. One can work around this problem by passing "-d mysql" to "rails new" but this took me some digging to figure out and I think the VM should work more cleanly out of the box.