Problems with upgrade

OBTW: My real objective in all this is to get my old blog that was
running with 4.0.3 working under a more modern Typo.

I suspect that my first attempt to upgrade that has made a mess of the
database. I’m not sure how far back Dreamhost keep backups.

Indeed in nothing is the power of the Dark L. more clearly shown than
in the estrangement that divides all those who still oppose him.
–J. R. R. Tolkien (as Haldir the elf), The Fellowship of the
Ring

Anton J Aylward said the following on 09/08/08 09:35 AM:

If it returns nothing, then something went wrong during the install
process since you MUST have the default blog created at install.

OK, so (a) why would that have happened? I didn’t record it but the
install didn’t report any errors. (b) What to do about it.

Well, regardless of the ‘why’, I tried the ‘what’ by creating a Blog#1
record from the database I had eventually got working on my laptop -
skipping the URL.

Some progress. Accessing the /admin on the live site running on
Dreamhost got me a registration screen. I filled that in and submitted
… and got a 50.

This time the logs said:

Processing AccountsController#signup (for 99.225.104.173 at 2008-08-09
06:38:31) [GET]
Session ID: xxxxxxxxxxxxxxx
Parameters: {“action”=>“signup”, “controller”=>“accounts”}
Rendering template within layouts/accounts
Rendering accounts/signup
Completed in 0.15706 (6 reqs/sec) | Rendering: 0.14986 (95%) | DB:
0.00000 (0%) | 200 OK
[http://emergence.antonaylward.com/accounts/signup]

Processing AccountsController#signup (for 99.225.104.173 at 2008-08-09
06:39:12) [POST]
Session ID: xxxxxxxxxxxxxx
Parameters: {“user”=>{“name”=>“Anton A.”,
“password_confirmation”=>“xxxxxxxx”, “login”=>“anton”,
“password”=>“xxxxxx”, “email”=>“[email protected]”},
“authenticity_token”=>“ade40a66166b4f66de”, “action”=>“signup”,
“controller”=>“accounts”}
Unable to send notification of create user email:
#<ActionView::TemplateError:

ActionView::TemplateError (private method `gsub’ called for
nil:NilClass) on line #6 of notification_mailer/_mail_footer.html.erb:
3:

This is being sent to <%=h @user.name %> because you asked to
be notified via email whenever
4: new content is posted to <%=
@blog.blog_name %>

5: To unsubscribe, go to
6: <%=h @link_url%>
7: and change your user settings.

 app/models/blog.rb:9:in `initialize'
 app/models/blog.rb:138:in `new'
 app/models/blog.rb:138:in `url_for'
 app/views/notification_mailer/_mail_footer.html.erb:6:in

`_run_erb_47app47views47notification_mailer47_mail_footer46html46erb’

Am I to conclude that Blog.base_url is critical?
For some reason that bothers me.
If I fill that in now and Dreamhost reorganizes their machine structure
or recovers from a crash and my account ends up on a machine with a
different IP then thigns are broken, right?

This seems a fragile design decision.

A distracted figure with a huge bushy beard blunders in just as you
speak the word of ancient magic. The man wears loose clothing, and an
expression of intense concentration. He is clutching his frizzy hair
with one hand; his other hand grips an intricate grid - the object of
his attention.

His eyes brighten the word you’ve spoken reaches his ears. “Yes! Yes!
That’s it!” he exclaims as he draws out a pen and fills in a row of
squares. “Now my hyperconstrained, double-acrostic, cryptic crossword is
complete, and ready to puzzle others. That was all I needed - just a
simple five-letter word, composed only of the letters ‘X’ ‘Y’ and ‘Z,’
that would fit here!”

He grips your hand and shakes it fervently. “Thank you! Now that I’ve
finished with that, I can get on to those other things I’ve been meaning
to do, such as monkey-wrenching the demolition and saving recreational
linguistics for future generations.” He turns away and mutters, just
before he departs, “I hope none of that will involve lying in front of a
bulldozer…”

Anton J Aylward wrote:

to install Typo on my laptop
Sorry, I never use the typo installer for my own site. The current_user
method should be defined in
vendor/plugins/typo_login_system/lib/login_system.rb.

Ah, an rpm based distro. Probably you need to install the -dev package
for libmysql as well.

I really don’t like this.
Why should I have to install an application development package just to
install Typo? Will I have to install a compiler and possibly YACC/LEX
as well.

Please guys, this is a bit of a heavy load.

Unfortunately, that’s a result of Ruby’s packaging system. Many people
don’t like that, including people who package software for the distros.
Not much the typo developers can do about it though.

Is this set of dependencies (on the compiler etc) declared anywhere?

The precise set of dependencies will depend on the distribution used.
That said, some general hints might be a welcome addition to the wiki.

Why do I have to go though this if I only want to use Typo with sqlite3

That, I cannot answer :-). Looking at the source repository, I see that
the dependency was changed at the same time the default database
changed.

The typo gem requires ‘rails-app-installer’, I’m guessing you need to
install that gem.

Is that dependency declared anywhere?

Oh, right, let me guess, if I’d installed with the GEM it would have
dragged that dependency in.

HA-BLOODY-HA-HA

Well, once you go by the ‘non-default’ route, your on you own ;-).

My “other” blog is Wordpress & I didn’t have this problem upgrading that.

Well, there was a whole thread on this mailing list recently about
installing PHP (Worpress is written in that) vs Ruby & Rails, so I wont
get into that :-):
http://www.mail-archive.com/[email protected]/msg04267.html

Originally preferred Typo to Wordpress, now I’m having my doubts.
I’m really disappointed in this “upgrade”. When I started using Typo
two years ago (26/08/06 08:54 PM) I had none of these problems, neither
on my laptop nor on Dreamhost (once they got Ruby 1.8.4 up). It was the
slickness and ease of installation & configuration that impressed me
back them.

It’s a pity that changed.

PostScript:

I just installed ‘libmysql-devel’ using urpmi, the normal and
recommended method, and ‘gem install typo’ still fails.

Am I correct in assuming from your later mails that you managed to get
this to work?

I seriously think you need to reconsider what it takes for an ordinary
non-development user to install Typo.

I’m just visiting :-).

Regards,
Matijs.

Matijs van Zuijlen said the following on 11/08/08 11:27 AM:

Sorry, I never use the typo installer for my own site. The current_user
method should be defined in
vendor/plugins/typo_login_system/lib/login_system.rb.

That’s nice. Unfortunately “for the rest of us”, the Wiki gives a
method that end up using the Typo Installer.

Perhaps you’d care to write up your method in the Wiki.

Anton J Aylward wrote:

Am I to conclude that Blog.base_url is critical?
For some reason that bothers me.
If I fill that in now and Dreamhost reorganizes their machine structure
or recovers from a crash and my account ends up on a machine with a
different IP then thigns are broken, right?

IP != URL, luckily, or the web wouldn’t work. Your base_url would be
http://emergence.antonaylward.com/ or something. That won’t change if
your IP changes.

This seems a fragile design decision.

It’s not that fragile. That said, I don’t like it much either :-). As
far as I can tell, it’s partly a left-over from when multi-blog support
was still on the table. Now that typo is definitively single-blog (at
least, I think it is) I have a feeling it should be possible to get rid
of it.

Regards,
Matijs.

Le 11 août 08 à 18:28, Anton J Aylward a écrit :

compiled and “-devel” packages from my RPM - to run typo. Part of

I think I’ve already explained this somewhere, either in the
CHANGELOG, or on Typo blog or even here, but I will do it once more.
Bis repetita semper placent as used to say my latin teacher.

When packaging an application like Typo – or let’s say Wordpress – you
need to decide for which environement you do it. This happens in
particular when choosing the default database. By default, a clever,
or supposed to be so, project team will choose the most widespread and
common one, which happens to be MySQL, just like, let’s say,
Wordpress, as it seems to be the reference here.

I don’t know why sqlite3 was choosen as a default before, maybe
because it didn’t need mysql server to be installed before having a
running Typo. But the truth is it was pretty stupid IMHO. Since it’s
made of a single flat file, sqlite just locks the database for every
non reading process, which includes INSERT, DELETE and UPDATE.
Creating a session, since we’re using ActeiveRecord session handler is
part of it, like commenting, or creating a post. In other words,
sqlite MUST NOT be used for a production web based multiple users – at
least visitors – application. Sqlite is perfect for creating index on
Mail.app or any other desktop since I’m the only one to access it, but
not on the internet.

The funniest part of the story is that, when sqlite was the default
dependency, people used to complain of the sqlite dependency when they
used MySQL / PgSQL.

I’ve been recently thinking in 3 directions :
– embedding all the dependencies in vendor/gem, but this will create
issues with native gem extensions, like MySQL ones.
– completely removing the Typo installer, only leaving sources, and a
list of dependencies. Since gem install now completely fullfills them,
I won’t care at all about what happens.
– having typosphere.org redirecting to wordpress.com since it’s what
people here want, mostly spending time crying and complaining, and
eventually thinking you can play the BOFH without knowing how to play
with UNIX.
– just starting something else, leaving the project dead, just like it
was when I took over it.


Frédéric de Villamil
[email protected] tel: +33 (0)6 62 19 1337
http://fredericdevillamil.com Typo : http://typosphere.org

On 11 Aug 2008, at 17:58, de Villamil Frédéric wrote:

– just starting something else, leaving the project dead, just like
it was when I took over it.

It’s bizarre, isn’t it, how angry people get when you give them
software for free?

It takes months of hard work to create something like Typo and many
more to keep it useful and up to date, and then people fling angry
messages around and make insulting remarks because they had to install
a database driver, or because the software didn’t allow for the fact
that they’ve got no idea what they’re doing. Half the time I think
they just use these mailing lists to work off some aggression.

In my opinion, open source doesn’t mean ‘free’, it means ‘shared’.
Shared ownership, shared workload, shared responsibility. If someone
gives you grief it’s perfectly acceptable for you to reply ‘so fix
it’. If they can’t fix it, or document it, or whatever it is that’s
required, then they will have to think about being nice to someone who
can.

I hope you don’t drop the project but I can well understand why you
would.

best,

will

On 11 Aug 2008, at 17:58, de Villamil Frédéric wrote:

I’ve been recently thinking in 3 directions :
– embedding all the dependencies in vendor/gem, but this will create
issues with native gem extensions, like MySQL ones.
– completely removing the Typo installer, only leaving sources, and
a list of dependencies. Since gem install now completely fullfills
them, I won’t care at all about what happens.

I’ve just been through a quick typo install procedure to see what the
fuss is all about, and if I were you I would keep it but cut it back:
create the directory tree and leave the application ready to run, but
don’t try and populate the database. Let them choose their own
database and migrate it. Half the time the setup will fail on
permissions anyway, and by being more conventional you’ll be able to
direct people to standard documentation rather than having to support
them yourself.

If they want hassle-free installation without ever having to type
RAILS_ENV, you can rent it to them as a service :slight_smile:

For me it would also make more sense to package less and require
more, but I expect that’s a matter of taste. There’s an awful lot of
code in there to handle edge cases and tricky user scenarios and to
save people from having to set things up properly. I’d throw away the
lot and let them work it out.

I’ll shut up now and walk the dog.

best,

will

Matijs van Zuijlen said the following on 11/08/08 11:27 AM:

Is this set of dependencies (on the compiler etc) declared anywhere?

The precise set of dependencies will depend on the distribution used.
That said, some general hints might be a welcome addition to the wiki.

At the very least the set of Ruby dependencies could be made clear.

I asked why I have to go though this - ‘this’ being installing compiled
and “-devel” packages from my RPM - to run typo. Part of the reason I
asked this was because Typo 4.1.2 needs sqlite3-ruby-1.2.2 when I
already had sqlite3-ruby-1.2.1 installed. That is why it required the
compiler etc. All my other ruby applications were running fine with
sqlite3-ruby-1.2.1, and the need to upgrade that was not documented and
was not made clear in this thread.

I’m still hoping for an explanation of this change and why its not an
artefact of one of the developers choices in packaging rather than a
functional necessity.


HTML has followed nature’s example… bright, sometimes flashing, colors
are a sign of indigestiblility.
– Rob Hartill

William Ross said the following on 11/08/08 02:12 PM:

It’s bizarre, isn’t it, how angry people get when you give them
software for free?

Yes, and its strange how people accept poor quality s/w just cost its
from a large, faceless corporation.

It takes months of hard work to create something like Typo and many
more to keep it useful and up to date, and then people fling angry
messages around and make insulting remarks because they had to install
a database driver,

Wait one moment.
I already had drivers installed. I already have working RoR
applications using both MySQL and SQlite.

This thread, if you will note, began with nothing to do with the
drivers. It had and still has as its subject “Problems with upgrade”.
The problems arose when I tried to upgrade my version of Typo 4.0.3
running with MySQL, following the instructions on the Wiki. No database
driver problems but a host of other problems.

Since I’m not ignorant of SDLC I tried installing via the GEM and also
via the tarz-ball on my laptop. That laptop already had the drivers
installed, as I’ve pointed out, and RoR applications working that use
both sets of drivers. I had no reason to suspect that drivers would be
a problem.

Frederic admitted to a typographic error in the Wiki. Thank you, that
helped me make progress - some - as far as the laptop went but didn’t
solve the original problem.

I’ve asked for a dependency list to be documented and was told that
documentation was too much trouble.

If the documentation had specified a dependency on sqlite-1.2.2 I could
have checked my libraries and see that I had a 1.2.1 and known I needed
to upgrade. No such documentation existed. Not such discussion or note
in the README or CHANGES explains why the later drivers were needed.
Perhaps they’re not functionally needed needed, perhaps they are an
artefact of the way the gem was packaged. Without documentation how can
we know?

or because the software didn’t allow for the fact
that they’ve got no idea what they’re doing.

Of course I don’t know - its not documented and I can’t find it in
package. I can’t read Frederic’s mind and I don’t have access to his
machine to look-see.

I do have the instructions in the Wiki to follow and have followed them
and come to grief. You can think of this as “debugging”. That to is
contributing, even if it does look like finding fault and being
critical. Its arrogant to assume that everyone involved in a project is
going to be a coder.

Usenet is like a herd of performing elephants with diarrhea: massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it. – spaf

de Villamil Frédéric said the following on 11/08/08 12:58 PM:

I asked why I have to go though this - ‘this’ being installing

common one, which happens to be MySQL, just like, let’s say,
Wordpress, as it seems to be the reference here.

Puh-lease!

Lets take this in parts.

  1. The guys at Rails seems to have switched to sqlite as the default
    for the development environment. I don’t know in detail why they
    did
    that but for a limited situation where the application is being
    reloaded every time, the inefficiencies of sqlite are outweighed by
    other factors. Probably the simplicity of not managing a server
    while doing “just” development has something to do with that.

  2. I have BOTH sqlite and MySQL on my laptop.
    When it came to install the Typo-5.1.2 gem the installer insisted
    on compiling new(er) versions of BOTH the MySQL and the sqlite
    ruby drivers.

    At Dreamhost, which I still can’t get the upgrade working and have
    continued to report the problems here and identified them as being
    on
    Dreamhost rather than the ‘virgin’ install on my laptop, I have
    always run Typo with MySQL.

not on the internet.
It is also perfect in the ‘single user’ development context as well,
which is, no doubt, why the Rails people recommend it as such.

But, as I said, trying to install Typo-5.1.2 on my laptop, which already
had the Ruby MySQL driver installed and a number of RoR applications
running using MySQL, most notably Radiant and the “What’s next”.

As far as Typo on Dreamhost goes, sqlite is NOT, repeat NOT, repeat NOT
being used. But when I took a dump of that database and tried
Typo-5.1.2 against it on my laptop, the gem still insisted on compiling
a new(er) version of the interface.

So the point I am making is not about the strengths or weaknesses of
sqlite vs MySQL; it is that I had functional versions of Ruby interfaces
for both and operating RoR applications using both, yet the gem install
of Typo-5.1.2 insisted on “upgrading” both sqlite and mysql drivers.

I’ve asked and I’m still asking: what is the deficiency in the old
drivers than necessitated this upgrade or is it just an artefact of the
way the gem was packed on that particular development machine?

The funniest part of the story is that, when sqlite was the default
dependency, people used to complain of the sqlite dependency when they
used MySQL / PgSQL.

Back when the RoR guys had MySQL a their default I used that.
As I said, the problem when I did the virgin install on my laptop was
that the instructions on the Wiki said to install the gem first. This
was before I had run “typo install …” to create the
“config/database.yml”. It was the install of the gem that raised the
dependency and required new versions of the MySQL and SQlite rivers to
be compiled. This has nothing whatsoever to do with any choice of
database I might or might not later make for the application. It holds
true even if then decide not to use Typo and leave the gem undisturbed.

I’ve been recently thinking in 3 directions :
– embedding all the dependencies in vendor/gem, but this will create
issues with native gem extensions, like MySQL ones.

… Just so long as you document it clearly …

– completely removing the Typo installer, only leaving sources, and a
list of dependencies. Since gem install now completely fullfills them,
I won’t care at all about what happens.

Perhaps that slit should be there anyway …

– having typosphere.org redirecting to wordpress.com since it’s what
people here want, mostly spending time crying and complaining, and
eventually thinking you can play the BOFH without knowing how to play
with UNIX.

I’ve known how to play with UNIX for over 30 years and played with more
versions than are currently available.

I believe in diversity and only ran Wordpress since Dreamhost offered it
as a one-click install when I needed to get something up fast. When it
came to the Typo4.0.3 version I took great care and crafted and
customized and had a good time. I like Rials and I prefer Ruby and don’t
think PHP is really OO. My mention of wordpress was as a comparison of
the ease of upgrade, not a comment on function or preference.

– just starting something else, leaving the project dead, just like it
was when I took over it.

I tried upgrading the 4.0.3 installation using the instruction on the
Wiki and met with the problems I’ve documented in this thread. You’ll
note it began with that and that’s why I used the subject like “Problems
with upgrade” rather than with install.

I tried doing a virgin install following the instructions on the Wiki
and met the problems I’ve documented. The Typo documentation does say
in the README “Typo supports MySQL, PostgreSQL, and SQLite” but when I
describe the problems I have had with both MySQL and with SQLite I get
met with sarcasm and derision. I dread trying PostgreSQL.

On 11 Aug 2008, at 19:51, Anton J Aylward wrote:

Sounds good to me.
That should simplify upgrade as well :frowning:

It certainly ought to. Typo has a fairly comprehensive up-and-
downgrade mechanism, though. I can see why the project would be
reluctant to let it go (even if the examples do refer to Rails 1.1.6!)

Just one thing. Standard and system documentation is fine for
standard and system stuff. But you are going to have to make some
specific stuff well documented. By that I mean things like
dependencies.

i always prefer to delegate that sort of thing if at all possible. Not
that it’s anything to do with me in this case. Things are more
difficult at the moment because Rails is presenting quite a shifting
target - everyone managing applications of any size had to do quite a
lot of work for 2 and now has to do it again for 2.1 (which is much
nicer, though), or is putting it off - but my own taste is for a
single large dependency rather than many small ones. Probably another
leftover perl habit: with CPAN modules you tend to require one and get
fifty, but the chain of delegated responsibility makes local
management much easier.

I’m not going to bother trying to find out if the requirement for
sqlite1.2.2 rather than 1.2.1 is a real one or an artefact for the
packaging since my real problem is getting the UPGRADE running on
Dreamhost, and that was both the start of this thread and nothing to
do with drivers.

That did sound annoying. It sounds like the problem arises when typo
calls rails-app-installer. The installer-helper tries to be all things
to all people and initialises lots of configuration that it then
doesn’t use. I don’t know why it should insist on SQLite 1.2.2: it
must be a packaging artefact, as you suggest, because the gem only
specifies sqlite3-ruby >= 1.1.0.

As far as I can tell, all it really does is create a database.yml and
run rake db:migrate, which radiant or mephisto would require you to do
anyway. I can’t help thinking the app might be better off without it.

And I’m sorry that my previous message was a bit broad in its
generalisations. Of course everyone has a legitimate frustration as
well. It’s just that the developer’s frustration is usually much the
greater. I must have had some left over :slight_smile:

best,

will

William Ross said the following on 11/08/08 02:29 PM:

I’ve just been through a quick typo install procedure to see what the
fuss is all about, and if I were you I would keep it but cut it back:
create the directory tree and leave the application ready to run, but
don’t try and populate the database. Let them choose their own
database and migrate it. Half the time the setup will fail on
permissions anyway, and by being more conventional you’ll be able to
direct people to standard documentation rather than having to support
them yourself.

Sounds good to me.
That should simplify upgrade as well :frowning:

Just one thing. Standard and system documentation is fine for standard
and system stuff. But you are going to have to make some specific stuff
well documented. By that I mean things like dependencies.

I’m not going to bother trying to find out if the requirement for
sqlite1.2.2 rather than 1.2.1 is a real one or an artefact for the
packaging since my real problem is getting the UPGRADE running on
Dreamhost, and that was both the start of this thread and nothing to do
with drivers.