Upgrading Typo with the instructions at http://typosphere.org/wiki/typo/Upgrade_Typo_with_Typo_installer and a ~/gems repository fails. Some stuff can deal with but this one defeats me. This is the error I get ..... Checking database Database exists, preparing for upgrade expanding apache13.conf.example template expanding apache20.conf.example template expanding lighttpd.conf.example template Migrating Typo's database to newest release /home/antonaylward/gems/gems/typo-5.1.2/bin/typo:59:in `migrate': Migration failed (RailsInstaller::InstallFailed) from /home/antonaylward/gems/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:689:in `in_directory' from /home/antonaylward/gems/gems/typo-5.1.2/bin/typo:57:in `migrate' from /home/antonaylward/gems/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:217:in `install_sequence' from /home/antonaylward/gems/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:192:in `install' from /home/antonaylward/gems/gems/rails-app-installer-0.2.0/lib/rails-installer/commands.rb:95:in `command' from /home/antonaylward/gems/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:646:in `execute_command' from /home/antonaylward/gems/gems/typo-5.1.2/bin/typo:93 from /home/antonaylward/gems/bin/typo:19:in `load' from /home/antonaylward/gems/bin/typo:19 A manual "rake db:migrate" completes OK. -- There are two ways to slide easily through life: to believe everything or to doubt everything; both ways save us from thinking. -- Alfred Korzybski
on 29.07.2008 17:00
on 29.07.2008 19:16
Anton J Aylward said the following on 29/07/08 10:42 AM: > > A manual "rake db:migrate" completes OK. > But it doesn't like my theme! (dual sidebar -- http://blog.emarm.com/articles/2006/08/09/multiple-sidebars-in-typo) I thought that if I logged in as admin I could change the theme, but I get a 500 on that. NoMethodError (undefined method `current_user=' for #<AccountsController:0x42659c84>): /app/controllers/accounts_controller.rb:8:in `login' -- It is an error to imagine that evolution signifies a constant tendency to increased perfection. That process undoubtedly involves a constant remodelling of the organism in adaptation to new conditions; but it depends on the nature of those conditions whether the directions of the modifications effected shall be upward or downward. Thomas H. Huxley
on 01.08.2008 20:04
Anton J Aylward said the following on 29/07/08 01:01 PM: > > NoMethodError (undefined method `current_user=' for > #<AccountsController:0x42659c84>): > /app/controllers/accounts_controller.rb:8:in `login' I've tried doing a clean install of a new 'site' rather than an upgrade and I still get this error. Am I supposed to have some other gem or plugin installed to deal with the ID/authentication? I also get ActionView::TemplateError (Couldn't find template file for /sidebars/sidebar/_content in ["~/typo5/themes/typographic/views", "/~typo5/app/views"]) on line #27 of themes/typographic/layouts/default.html.erb: 24: <%= render :partial => 'shared/search' %> 25: 26: <!-- sidebar components --> 27: <%= render_sidebars %> 28: </div> 29: 30: <div id="content"> Which I find difficult to understand. I though 'typographic' was the default layout and so would be fully supplied. Alternatively I don't understand why the engine isn't looking and finding ~/typo5/app/view/sidebars Perhaps because its 'sidebar' rather than than 'sidebars'? $ ls typo5/app/views/ accounts/ articles/ layouts/ notification_mailer/ shared/ theme/ admin/ comments/ live/ settings/ sidebar/ xml/ $ ls typo5/app/views/sidebar/ _row.html.erb _sidebar.html.erb display_plugins.html.erb show.html.erb No, we need an extra level in there. How come this happens to me? How come I haven't seen mention of this in the bug reports?
on 04.08.2008 21:25
So, in an effort to compare the upgrade with a virgin install, I'm
trying to install typo on my laptop.
I start with
$ sudo gem install typo
and I get
Password:
Building native extensions. This could take a while...
ERROR: Error installing typo:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install typo
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... 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.
Oh!
Well I do have /usr/lib/mysqlclient ...
# rpm -q -f /usr/lib/libmysqlclient.so
libmysql15-5.0.45-8.2mdv2008.0
Now it happens that is sripped. I don't know why.
So I gave up o that and tried installing from the .tgz
I unpacked ok, and then
[anton@laptop Ruby]$ ./typo-5.1.2/bin/typo install \
typo-5.1.2/db/emerge \
database=sqlite3
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- rails-installer
(LoadError)
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from ./typo-5.1.2/bin/typo:4
Hmm. So I try
[anton@laptop Ruby]$ find /usr/lib/ruby /home/anton \
-name 'rails-installer*' -print
which returns nothing.
Yes, I did a 'sudo gem update' before this.
on 05.08.2008 02:58
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Anton, Anton Aylward wrote: > So, in an effort to compare the upgrade with a virgin install, I'm > trying to install typo on my laptop. What OS are you running on your laptop. I'm guessing Linux? Which distribution? > I start with > > $ sudo gem install typo > > and I get > > [...] > 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. What are those details in mkmf.log? > Oh! > Well I do have /usr/lib/mysqlclient ... > # rpm -q -f /usr/lib/libmysqlclient.so > libmysql15-5.0.45-8.2mdv2008.0 > Now it happens that is sripped. I don't know why. Ah, an rpm based distro. Probably you need to install the -dev package for libmysql as well. > Hmm. So I try > > [anton@laptop Ruby]$ find /usr/lib/ruby /home/anton \ > -name 'rails-installer*' -print > > which returns nothing. The typo gem requires 'rails-app-installer', I'm guessing you need to install that gem. Regards, Matijs. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFIl6T2h3TgaXYDPEERAuV6AKCQ2dRVJXUBsnJZ96HaNDIZCeeulwCePw90 qZL/rCDCYydwscgrP28twCE= =opYv -----END PGP SIGNATURE-----
on 05.08.2008 14:03
Matijs van Zuijlen said the following on 04/08/08 08:55 PM: > Hi Anton, Hi, and thanks. No, realy, I'm grateful someone finally replied. I was getting frustrated. (Still am actually!) This was my 4th or fifth post about problems with this version of Typo. I'd tried upgrading my site first - MISTAKE! - and have a number of posts about that. Perhaps you'd care to look back over them and comment on that content as the experience was a bit different from this attempt to install Typo on my laptop > Anton Aylward wrote: >> So, in an effort to compare the upgrade with a virgin install, I'm >> trying to install typo on my laptop. > > What OS are you running on your laptop. I'm guessing Linux? Which > distribution? Mandriva 2008.0 > > What are those details in mkmf.log? See later >> Oh! >> Well I do have /usr/lib/mysqlclient ... >> # rpm -q -f /usr/lib/libmysqlclient.so >> libmysql15-5.0.45-8.2mdv2008.0 >> Now it happens that is sripped. I don't know why. > > 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. So I load up gcc etc and it turns out that the error in the log file is conftest.c: In function ‘t’: conftest.c:3: error: ‘mysql_query’ undeclared (first use in this function) Is this set of dependencies (on the compiler etc) declared anywhere? Why do I have to go though this if I only want to use Typo with sqlite3 >> Hmm. So I try > >> [anton@laptop Ruby]$ find /usr/lib/ruby /home/anton \ >> -name 'rails-installer*' -print > >> which returns nothing. > > 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 My "other" blog is Wordpress & I didn't have this problem upgrading that. 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. PostScript: I just installed 'libmysql-devel' using urpmi, the normal and recommended method, and 'gem install typo' still fails. I seriously think you need to reconsider what it takes for an ordinary non-development user to install Typo. > Regards, > Matijs. -- You can either take action, or you can hang back and hope for a miracle. Miracles are great, but they are so unpredictable. --Peter F. Drucker
on 06.08.2008 21:54
Le 5 août 08 à 14:03, Anton J Aylward a écrit : > posts about that. Perhaps you'd care to look back over them and >> distribution? >>> details. You may need configuration options. >> package > So I load up gcc etc and it turns out that the error in the log file > Why do I have to go though this if I only want to use Typo with >>> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > > two years ago (26/08/06 08:54 PM) I had none of these problems, > I just installed 'libmysql-devel' using urpmi, the normal and > > >> Regards, >> Matijs. > Hello, first, sorry for not replying faster, I was in holliday and got internet access only tonight. Trying to answer the pile of mails that's waiting for me. This is not a Typo but rails issue: to use a Rails application, you need a database driver, ie ruby mysql driver. That's the reason why you needed so much dependencies. In an ideal world, your distro would embed a package named ruby-mysql with the proper driver, or anything else. The problem is Rails gem has its own dependencies system which differs from RPM and you won't register Typo MySQL gem with rpm and the contrary. I've actually tried to reduce the number of dependencies in the last releases, removing some of them as much as I could. Cheers, Frédéric -- Frédéric de Villamil frederic@de-villamil.com tel: +33 (0)6 62 19 1337 http://fredericdevillamil.com Typo : http://typosphere.org
on 07.08.2008 16:43
de Villamil Frédéric said the following on 06/08/08 03:51 PM: > [Big Snip of relevant material - review previous messages if you need it ] > > This is not a Typo but rails issue: to use a Rails application, you > need a database driver, ie ruby mysql driver. That's the reason why > you needed so much dependencies. In an ideal world, your distro would > embed a package named ruby-mysql with the proper driver, or anything > else. Help me here. Typo is built on and thus dependent on Rails Rails is the part that needs the database drives, not Typo itself. Is that correct? So, if I were to use gem to remove the typo gem, update the various gems that make up rails, probably activerecord in particular, doing whatever compiles are necessary, and then used gem to install the typo gem, it wouldn't be a problem, because the database driver is in Rails not in Typo. So I do that and this is what I get: [root@laptop ~]# gem update Updating installed gems Nothing to update [root@laptop ~]# gem list | egrep "rails|action|active|typo" actionmailer (2.1.0, 2.0.2, 2.0.1, 1.3.3, 1.3.2, 1.3.1, 1.2.5, 1.2.1, 1.0.1) actionpack (2.1.0, 2.0.2, 2.0.1, 1.13.3, 1.13.2, 1.13.1, 1.12.5, 1.12.1, 1.9.1) actionwebservice (1.2.6, 1.2.3, 1.2.1, 1.1.6, 1.1.2, 0.8.1) activerecord (2.1.0, 2.0.2, 2.0.1, 1.15.3, 1.15.1, 1.14.4, 1.14.2, 1.11.1) activeresource (2.1.0, 2.0.2, 2.0.1) activesupport (2.1.0, 2.0.2, 2.0.1, 1.4.2, 1.4.0, 1.3.1, 1.1.1) rails (2.1.0, 2.0.2, 2.0.1, 1.2.3, 1.2.2, 1.2.1, 1.1.6, 1.1.2) rails_product (0.6, 0.5) transaction-simple (1.4.0) [root@lpatop ~]# gem install typo Building native extensions. This could take a while... ERROR: Error installing typo: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb install typo 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. The mkmf.log just repeats that and gives a list of compile options. > The problem is Rails gem has its own dependencies system which > differs from RPM and you won't register Typo MySQL gem with rpm and > the contrary. It would be nice if dynamic linking was used under Linux. Never the less, it appears that Typo is trying to compile database drivers of its own. > I've actually tried to reduce the number of dependencies in the last > releases, removing some of them as much as I could. So what dependency is triggering this? I have other rails applications on my laptop that use sqlite3 and mysql with the installed rails gems. Surely that means I have a sqlite and mysql driver that rails can make use of. Surely dependencies would be one of the things that needs to be documented! Never the less, none of this addresses the problems I've had at Deeamhost and when I've tried installing from the tarz-ball. Please see my other mail under this subject heading.
on 07.08.2008 17:15
de Villamil Frédéric said the following on 06/08/08 03:51 PM: > > This is not a Typo but rails issue: to use a Rails application, you > need a database driver, ie ruby mysql driver. That's the reason why > you needed so much dependencies. In an ideal world, your distro would > embed a package named ruby-mysql with the proper driver, or anything > else. The problem is Rails gem has its own dependencies system which > differs from RPM and you won't register Typo MySQL gem with rpm and > the contrary. Well I loaded up all the database "-devel" RPMs and got typo to install. I still think this dependency should be documented and the justification for the later version of the database interfaces explained. Perhaps even a way to fall back... So, that done I try to set up typo ... That fails still [anton@laptop Ruby]$ mkdir typo-5.1.2; mkdir typo-5.1.2/db [anton@laptop Ruby]$ typo install typo-5.1.2/db/emerge database=sqlite3 Installing typo 5.1.2 /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer/databases.rb:16:in `connect': undefined method `yml' for RailsInstaller::Database:Class (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer/databases.rb:36:in `backup' from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:261:in `backup_database' from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:205:in `install_sequence' from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:192:in `install' from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer/commands.rb:95:in `command' from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:646:in `execute_command' from /usr/lib/ruby/gems/1.8/gems/typo-5.1.2/bin/typo:93 from /usr/bin/typo:19:in `load' from /usr/bin/typo:19 -- System Integrity Revisited Rebecca T. Mercuri and Peter G. Neumann Inside Risks 127, CACM 44, 1 January 2001
on 07.08.2008 17:22
Le 7 août 08 à 17:02, Anton J Aylward a écrit : > install. > database=sqlite3 > from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/ > lib/rails-installer.rb:192:in `install' > from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/ > lib/rails-installer/commands.rb:95:in `command' > from /usr/lib/ruby/gems/1.8/gems/rails-app-installer-0.2.0/ > lib/rails-installer.rb:646:in `execute_command' > from /usr/lib/ruby/gems/1.8/gems/typo-5.1.2/bin/typo:93 > from /usr/bin/typo:19:in `load' > from /usr/bin/typo:19 > > Hello, I understand your problem, so I'll try to make it clear. Writing docs is long, very long, and I'm currently alone doing it, along with a real job, a family and even a bit of social life. I'd love to handle every dependencies issues for every distro, but honnestly, I don't have time. There are many docs on the interweb that explains how to setup a rails installation on (almost) every OS, because HURD and Plan9 aren't supported. Yet. For your problem, I made a typo (sic) in the typosphere doc. Try typo install typo-5.1.2/db/emerge database=sqlite but using sqlite is not a very good idea. Regards, Frédéric -- Frédéric de Villamil frederic@de-villamil.com tel: +33 (0)6 62 19 1337 http://fredericdevillamil.com Typo : http://typosphere.org
on 07.08.2008 17:45
Le 7 août 08 à 16:42, Anton J Aylward a écrit : > > > 1.12.1, 1.9.1) > ERROR: Error installing typo: > > drivers of its own. > Surely dependencies would be one of the things that needs to be > documented! > > > Never the less, none of this addresses the problems I've had at > Deeamhost and when I've tried installing from the tarz-ball. > Please see my other mail under this subject heading. > libsqlite3-devel or something like this Regards Frédéric -- Frédéric de Villamil frederic@de-villamil.com tel: +33 (0)6 62 19 1337 http://fredericdevillamil.com Typo : http://typosphere.org
on 07.08.2008 17:47
de Villamil Frédéric said the following on 07/08/08 11:24 AM:
> libsqlite3-devel or something like this
Indeed. Done. And that leads to other problems and still doesn't
address the problems arising from trying to install from the tarz-ball
But figuring that out from the error messages is a poor way to work.
Is this formally documented anywhere?
is there a dependency tree documented?
--
The ability to learn faster than your competitors may be the only
sustainable competitive advatage.
- Arie De Geus, Planning Coordinator
Royal Dutch Shell
on 07.08.2008 22:23
Anton Aylward wrote: > I also get > > > > ActionView::TemplateError (Couldn't find template file for > /sidebars/sidebar/_content in ["~/typo5/themes/typographic/views", > "/~typo5/app/views"]) on > line #27 of themes/typographic/layouts/default.html.erb: > 24: <%= render :partial => 'shared/search' %> > 25: > 26: <!-- sidebar components --> > 27: <%= render_sidebars %> > 28: </div> > 29: > 30: <div id="content"> I had the same problem, and found the solution (at least it worked for me). The problem is that some leftovers in the sidebars table are left, probably in the upgrade migrations. What you have to do is open the console (in production environment or whatever other environment you're using for your blog) and remove the sidebars that have undefined "type" (= nil). This line should do: Sidebar.find(:all, :order => 'active_position ASC').find_all {|s| s.type.nil?}.each {|s| s.destroy} (Yeah, the line could be simpler, I just copy-pasted the line I just used, while I was experimenting)
on 07.08.2008 22:38
Esteban Manchado velázquez wrote: > Anton Aylward wrote: >> I also get >> >> >> >> ActionView::TemplateError (Couldn't find template file for >> /sidebars/sidebar/_content in ["~/typo5/themes/typographic/views", >> "/~typo5/app/views"]) on >> line #27 of themes/typographic/layouts/default.html.erb: >> 24: <%= render :partial => 'shared/search' %> >> 25: >> 26: <!-- sidebar components --> >> 27: <%= render_sidebars %> >> 28: </div> >> 29: >> 30: <div id="content"> > > I had the same problem, and found the solution (at least it worked for > me). The problem is that some leftovers in the sidebars table are left, > probably in the upgrade migrations. > > What you have to do is open the console (in production environment or > whatever other environment you're using for your blog) and remove the > sidebars that have undefined "type" (= nil). This line should do: > > Sidebar.find(:all, :order => 'active_position ASC').find_all {|s| > s.type.nil?}.each {|s| s.destroy} > > (Yeah, the line could be simpler, I just copy-pasted the line I just > used, while I was experimenting) Gah! I just realised that this will delete the HTML blocks (e.g. with links) that you may have, so you have to remake those. You should have a backup copy of the database, even if you execute that thing first and then read this message, so it shouldn't be a problem...
on 07.08.2008 22:40
Esteban Manchado velázquez wrote: > Gah! I just realised that this will delete the HTML blocks (e.g. with > links) that you may have, so you have to remake those. You should have a > backup copy of the database, even if you execute that thing first and > then read this message, so it shouldn't be a problem... Uh, nevermind, in my case it seemed to delete only content that was there by default, so you shouldn't lose any data created by yourself. In any case, make sure that you have the backup around, just in case. Sorry for the noise, I panicked for a moment because I didn't want anyone to lose data because of my solution :-)
on 08.08.2008 02:02
Esteban Manchado velázquez said the following on 07/08/08 04:40 PM: > Sorry for the noise, I panicked for a moment because I didn't want > anyone to lose data because of my solution :-) I'm sorry, after your 'panic' I deleted the previous messages. Could you repeat that slowly, please....
on 08.08.2008 15:07
After much fluffing around and quite possibly by accident I got the
version of Typo-5.1.2 running on my laptop. heartened by this I
returned to my Dreamhost account and tried once again to set up a
clean/new instance.
No luck.
The "typo install" went well. I'd set up GEN_HOME and GEM_PATH and PATH
and checked carefully that the gems being used were the ones I thought.
All looked fine until I tried running it. Neither the real nor the
admin interfaces worked - I got a 500 on each.
The logs reported ...
Processing DashboardController#index (for 99.225.104.173 at 2008-08-07
19:50:00) [GET]
Session ID: 93269476e54e65f3421f49ddacabab13
Parameters: {"action"=>"index", "controller"=>"admin/dashboard"}
NoMethodError (undefined method `lang' for nil:NilClass):
/app/controllers/application.rb:35:in `load_lang'
/vendor/rails/actionpack/lib/action_controller/filters.rb:469:in
`send!'
/vendor/rails/actionpack/lib/action_controller/filters.rb:469:in
`call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:441:in
`run'
Well hey, that's different from before when it was complaining about
current_user being undefined this time.
So what's up here? Is this another undocuemnted dependency?
on 09.08.2008 10:11
Le 8 août 08 à 15:07, Anton J Aylward a écrit : > admin interfaces worked - I got a 500 on each. > /app/controllers/application.rb:35:in `load_lang' > > So what's up here? Is this another undocuemnted dependency? > Hello, I remember running into this when I tried to build 5.0.3 gem. Can you run ./script/console RAILS_ENV=your_current_environment and launch Blog.find(:all) If it returns nothing, then something went wrong during the install process since you MUST have the default blog created at install. Are you sure you're running Rails 2.0.2 btw ? I'll be absent til sunday evening so don't expect any reply before monday Cheers, Frédéric -- Frédéric de Villamil frederic@de-villamil.com tel: +33 (0)6 62 19 1337 http://fredericdevillamil.com Typo : http://typosphere.org
on 09.08.2008 12:18
Anton Aylward wrote: > Esteban Manchado vel�zquez said the following on 07/08/08 04:40 PM: >> Sorry for the noise, I panicked for a moment because I didn't want >> anyone to lose data because of my solution :-) > > I'm sorry, after your 'panic' I deleted the previous messages. > > Could you repeat that slowly, please.... Haha, sorry. The solution I posted in the first place works without problems (in my case anyway), it was a false alarm. So, what you have to do is: (1) open the console (in production environment or whatever other environment you're using for your blog) and (2) remove the sidebars that have undefined "type" (= nil). This line should do: Sidebar.find(:all, :order => 'active_position ASC').find_all {|s| s.type.nil?}.each {|s| s.destroy} That line could be simpler, and you may want to have a look and the sidebar items you have in the database (in particular, the ones with type = nil) before changing anything. Apart from that, it should work. In any case, make sure you have a backup of your database. Just in case.
on 09.08.2008 15:38
de Villamil Frédéric said the following on 09/08/08 04:11 AM: > > I remember running into this when I tried to build 5.0.3 gem. Can you > run ./script/console RAILS_ENV=your_current_environment and launch > Blog.find(:all) I''m sure you didn't mean that! $ ./script/console RAILS_ENV=development Loading RAILS_ENV=development environment (Rails 2.0.2) /home/.jordana/antonaylward/typo5/config/../vendor/rails/railties/lib/initializer.rb:206:in `read':Errno::ENOENT: No such file or directory - /home/.jordana/antonaylward/typo5/config/environments/RAILS_ENV=development.rb :-) [ralphie]$ RAILS_ENV=development ./script/console Loading development environment (Rails 2.0.2) >> Blog.find(:all) => [] [ralphie]$ RAILS_ENV=production ./script/console Loading production environment (Rails 2.0.2) >> Blog.find(:all) => [] > 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. > Are you sure you're running Rails 2.0.2 btw ? Yes. > I'll be absent til sunday evening so don't expect any reply before > monday :-) its not life critical. -- It is an error to imagine that evolution signifies a constant tendency to increased perfection. That process undoubtedly involves a constant remodelling of the organism in adaptation to new conditions; but it depends on the nature of those conditions whether the directions of the modifications effected shall be upward or downward. Thomas H. Huxley
on 09.08.2008 16:13
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 Aylward", "password_confirmation"=>"xxxxxxxx", "login"=>"anton", "password"=>"xxxxxx", "email"=>"anton@si.on.ca"}, "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: <p><em>This is being sent to <%=h @user.name %> because you asked to be notified via email whenever 4: new content is posted to <a href="<%= @blog.base_url%>"><%= @blog.blog_name %></a> 5: To unsubscribe, go to 6: <a href="<%= @link_url = @blog.url_for(:controller => '/admin/users', :action => 'edit', :id => @user.id) %>"><%=h @link_url%></a> 7: and change your user settings.</p> 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..."
on 09.08.2008 16:35
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 Lord 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_
on 11.08.2008 15:39
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.
on 11.08.2008 17:31
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/typo-list@rubyforge.org/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.
on 11.08.2008 18:27
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.
on 11.08.2008 18:29
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
on 11.08.2008 19:01
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 frederic@de-villamil.com tel: +33 (0)6 62 19 1337 http://fredericdevillamil.com Typo : http://typosphere.org
on 11.08.2008 20:12
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.08.2008 20:29
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 :) 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
on 11.08.2008 20:44
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
on 11.08.2008 20:44
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.08.2008 20:51
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 :-( 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.
on 11.08.2008 21:42
On 11 Aug 2008, at 19:51, Anton J Aylward wrote: > > Sounds good to me. > That should simplify upgrade as well :-( 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 :) best, will