It’s just data

Upgrade Unavailable?

Setting

uname -a:

Darwin rubymac 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386

sw_vers:

ProductName:	Mac OS X
ProductVersion:	10.5.8
BuildVersion:	9L31a

Problem #1

gcc -I. -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1/i386-darwin9.8.0 -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1/ruby/backward -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe  -o backup.o -c backup.c
gcc -I. -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1/i386-darwin9.8.0 -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1/ruby/backward -I/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long  -fno-common -pipe  -o database.o -c database.c
database.c: In function 'initialize':
database.c:47: error: 'SQLITE_OPEN_READWRITE' undeclared (first use in this function)
database.c:47: error: (Each undeclared identifier is reported only once
database.c:47: error: for each function it appears in.)
database.c:47: error: 'SQLITE_OPEN_CREATE' undeclared (first use in this function)
database.c:72: error: 'SQLITE_OPEN_READONLY' undeclared (first use in this function)
database.c: In function 'set_sqlite3_func_result':
database.c:278: error: 'sqlite3_int64' undeclared (first use in this function)
make: *** [database.o] Error 1

Potential solution #1

Problem #2

rake db:migrate
NoMethodError: undefined method `to_a' for #<SQLite3::Statement:0x2dd1a88>:           SELECT name
          FROM sqlite_master
          WHERE type = 'table' AND NOT name = 'sqlite_sequence'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:173:in `block in exec_query'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:222:in `block in log'
/Users/rubys/git/rails/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:217:in `log'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:167:in `exec_query'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:259:in `tables'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:25:in `table_exists?'
/Users/rubys/git/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:417:in `initialize_schema_migrations_table'
/Users/rubys/git/rails/activerecord/lib/active_record/migration.rb:634:in `initialize'
/Users/rubys/git/rails/activerecord/lib/active_record/migration.rb:549:in `new'
/Users/rubys/git/rails/activerecord/lib/active_record/migration.rb:549:in `up'
/Users/rubys/git/rails/activerecord/lib/active_record/migration.rb:530:in `migrate'
/Users/rubys/git/rails/activerecord/lib/active_record/railties/databases.rake:161:in `block (2 levels) in <top (required)>'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/rubys/.rvm/rubies/ruby-1.9.2-r32882/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/bin/rake:19:in `load'
/Users/rubys/.rvm/gems/ruby-1.9.2-r32882/bin/rake:19:in `<main>'

Potential solution #3

Problem #3

Snow Leopard is not available in any local Best Buy stores (I tried 3).  Nor were they able to order for me via the web. 

Nor is Snow Leopard available at the local Apple store.  They too were not able to order it for me.

Summary

Sqlite3 3.7.4 doesn’t like Mac OSX 10.5.8.  Rails 3.1 doesn’t like sqlite3-ruby -v 1.2.5.  Neither Best Buy nor Apple will sell me Snow Leopard; not from their Brick and Mortar stores nor online.  Nor is Lion an option as upgrading to Snow Leopard is a prerequisite.

If anybody has any suggestions, please let me know.  Meanwhile, I can say this: while every previous version of Agile Web Development had screenshots of Safari on a Mac, the next update will have screenshots of Chrome on Ubuntu.


I believe that if you call Apple, either via their technical support or sales numbers, you can get connected to someone who will be willing to sell you a copy of Snow Leopard.

I know that, as of last fall, it was possible to do this to get a copy of Tiger (which I had briefly considered for my G4 iBook).

Posted by Chris Ess at

It’s possible that the thumb drive installer which will soon be available for purchase from Apple will support upgrading from Leopard. If not, you’d be able to wipe your drive, install Lion, then use Migration Assistant to migrate all your apps and data from a backup.

Posted by Avi Flax at

If you have access to the downloaded Lion installer, you can create an install DVD/drive:

[link]

Posted by Matt May at

I’m pretty sure the $69 thumb-drive distribution will support installation from Leopard. The only reason why you “need” Snow Leopard is that, currently, you need to buy Lion from the App Store, and the App Store requires Snow Leopard.

If you can’t wait, there are instructions for creating a thumb-drive installer from the App-Store-provided Lion installer. To get the latter, of course, you still need (a friend with) Snow Leopard.

Posted by Jacques Distler at

Pissed you off, have they? Having worked both sides of the street I can tell you unequivocally that they both have their issues and I find the OS/X side far more palatable. Good luck with whatever path you take.

Having said that, you can still order Snow Leopard from Amazon.com. You can also go to an Apple store and they’ll help you out. Unfortunately, you’ll probably need to do a clean install of Lion if you have to go to an Apple store or if you find someone willing to help you out with a Lion thumb drive.

Posted by Ted Wise at

Snow Leopard is still available on the Apple online store:

[link]

The link is directly from the Lion “how to buy” page [link] which says:

To upgrade on day one:

Step 1:
Make sure your Mac can run Lion.
Your Mac must have an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor to run Lion. Find out if your current Mac has one of these processors by clicking the Apple icon at the top left of your screen, then choosing About This Mac.

Step 2:
Make sure you have the latest version of Snow Leopard.
Get up to date with the latest version of OS X Snow Leopard to purchase OS X Lion from the Mac App Store. If you have Snow Leopard, click the Apple icon and choose Software Update to install Snow Leopard v10.6.8, the latest version.

Step 3:
Download OS X Lion from the Mac App Store.
Open the Mac App Store from your Dock to buy and download it. Then follow the onscreen instructions to install Lion.

Posted by Martina at

they both have their issues

What is this both of which you speak?

You can also go to an Apple store and they’ll help you out

I did, and they didn’t.  In fact, they “helpfully” suggested that I go to Best Buy.

Posted by Sam Ruby at

switch to Windows?

sorry, could not resist ;)

Posted by Mike Hall at

switch to Windows?

I realize that’s a joke, but I do test on Windows too.  Comparing my experience between Windows and OS X, what I find is:

I will admit that the thing that surprised me the most was the attitude of the sales associate in the Apple store.  It essentially was “We no longer sell upgrades.  Go elsewhere.”  That person didn’t even seem to be aware that Apple’s web site does sell upgrades, though I will state that I haven’t tried it yet.  My experience with Best Buy is that their web site also says that they do, and they will allow you to add the product to your cart, but ultimately they will stop you at check out.

At the present time, the promised USB key sounds the most appealing to me.  Particularly if it allows me to do a fresh install as opposed to an upgrade.

Posted by Sam Ruby at

It’s very likely that you have sqlite3 installed via MacPorts. If so, then all builds of Ruby’s sqlite3 gem will pick the MacPorts-supplied sqlite, even though you might have installed a newer version in /usr/local.
What worked for me was as simple as:

$sudo mv /opt /opt-disabled
$which sqlite3
   /usr/local/bin/sqlite3
$gem install sqlite3-ruby
$sudo mode /opt-disabled /opt

Somehow the version of sqlite-3 supplied by macports ain’t good enough for sqlite3-ruby to work with.

On a sidenote - I hate to sound like a whiner, but this attitude of “debian repos are so much more awesome than macports/fink/homebrew/thing-du-jour and OSX has nothing like them and they ship binaries!” (also recently seen here http://avdi.org/devblog/2011/08/09/why-linux/) is not very constructive. The fact that geeks could not put up a decent binaries distribution system for OSX is a shame for geeks, not for the OS (however awful mouth-shut attitude of Apple developer relationships is sucky).

Posted by Julik at

BTW, your spam detection seems to fail if URI is left empty (stacktrace...).

Posted by Mike Hall at

Somehow the version of sqlite-3 supplied by macports ain’t good enough for sqlite3-ruby to work with

Don’t sound right to me:

$ sqlite3 --version
3.7.7.1 2011-06-28 17:39:05 af0d91adf497f5f36ec3813f04235a6e195a605f
$ which sqlite3
/opt/local/bin/sqlite3
$ sudo mv /opt /opt-disabled
Password:
$ which sqlite3
/usr/bin/sqlite3
$ /usr/bin/sqlite3 --version
3.4.0

But if I do find a combination that works, I will certainly post it here.

this attitude of “debian repos are so much more awesome than macports/fink/homebrew/thing-du-jour and OSX has nothing like them and they ship binaries!”

Forgive me, but you are projecting.  I made no such complaints.  I am quite comfortable with the idea of ./configure; make; sudo make install.  What I was unprepared for is going into a store with an Apple logo on it wanting to pay money to upgrade my operating system and being told to go elsewhere.

Posted by Sam Ruby at

This article from MacWorld tells you how to upgrade to Lion from Leopard.  Scroll down to the “quick-but-techie way” for how you can do so without losing data.  One tip.  Disconnect all external drives before attempting the upgrade, or the installer might get stuck.

Posted by Nathan Brazil at

Nathan: those instructions seem to presume that I have a Snow Leopard or Lion computer to download the Lion installer from the Mac App Store.  I do not.

Posted by Sam Ruby at

Mac OS X 10.6 Snow Leopard Order number W268343852; we’ll see how it goes.

Posted by Sam Ruby at

Don’t sound right to me:

Well, it’s exactly what I was saying. You have a macports sqlite3 and the gem cannot be built because it picks it’s headers and libs from the macports version. Note that in my example I have a RYO sqlite 3 (built from official source).

Forgive me, but you are projecting.

Point taken, sorry if I sounded rude.

What I was unprepared for is going into a store with an Apple logo on it wanting to pay money to upgrade my operating system and being told to go elsewhere.

Apparently they will be offering it on USB sticks.

Posted by Julik at

Mac OS X 10.6 Snow Leopard Order number W268343852

Arrived at FedEx location in Allentown, PA at Aug 15, 2011 10:08 PM local time; Estimated delivery: Aug 20, 2011.

Posted by Sam Ruby at

OK, this is new to me.  I routinely ship packages via the USPS from Raleigh, NC to Mountain Home, Idaho.  If I drop something off on Monday afternoon my time it tends to arrive on Thursday afternoon.

After 5 days, Apple shipped the package to me via FedEx from Pennsylvania.  Three days later, it is at Raleigh.  Now here is the surprising part: once it arrived in Raleigh, FedEx handed the box off to the USPS for delivery.

I didn’t know that FedEx did that.

Posted by Sam Ruby at

When we have numbers in the range of ~20% (based on an opt-in measurement of a subset, etc etc) of mac users still using 10.5, that’s a pretty huge problem.
[link]

I hope that whatever you end up paying is less than $99 total, which would be the cost of a year’s developer license... allowing you to download 10.6 in DMG form that can be easily burned to DVD or restored to a one-use install partition. And... upgrade to lion at no cost as well. Now. Immediately. Without waiting for packages.

Posted by Travis Tilley at

Travis: apparently, that’s yet another option that the unhelpful sales associate at the Apple store could have pointed me to, but failed to do.  I will say that for my purposes (as a book author), it is better to be set up as a typical (non-developer) reader would be.

As it is, package received, at a total expense (so far) of $35.23.  I have yet to order Lion, and no near term plans to do so.

I’ll write up my initial experiences shortly.

Posted by Sam Ruby at

Snow Leopard

Three plus years later and I upgrade my Operating System to Snow Leopard.  Yes, I know that’s not the latest shiny bits, but I prefer to stay one step behind.  I documented my acquisition adventures separately. I received the box... [more]

Trackback from Sam Ruby

at

I would not be sent away if I were to want to buy an upgrade to Windows.

If you were upgrading from Windows 2000 to Windows XP, you probably would be sent away.

If you want to buy Windows XP, you need to head to eBay. It’s not available from retailers and if you already have installation media with a license key tied to a particular computer, Microsoft refuses to sell you another license key for installing it on another computer. And if you have Windows 7 Professional or higher but want to run the included XP in a non-Microsoft VM on the same physical computer, Microsoft won’t let you do that, either.

Posted by Henri Sivonen at

Henri, you are missing the point.  If Lion had been on the shelf, I would have purchased that.  But it is not on the shelf, you have to install Snow Leopard first.  And, no, Snow Leopard is not on the shelf either, in the few stores that would have carried such.  And, no, none of them are expecting any more.  I had to order it and wait for it to be shipped.

By contrast, I can find Windows 7 in any number of stores for immediate purchase.

As to what computers Microsoft will let you run their operating systems on vs what computers Apple will let you, do we really want to go there?

Posted by Sam Ruby at

It probably doesn’t help you now but I found the answer to the problem of installing the sqlite3 gem on OS X 10.5.8 here:

http://stackoverflow.com/questions/3458602/sqlite3-ruby-install-error-on-ubuntu/3458647#3458647

$ sudo gem install sqlite3 -- --with-sqlite3-dir=/opt/local/

Posted by j at

Add your comment