Radiant gem (beta 2): database setup issue

After having installed the gem (beta 2) and created an instance, when
I attempt to setup the database in production env I get the following
error (if I setup the database in default–or explicitly in
development environment I don’t get the error). Is there something
obvious I’m missing?

electronicbusiness radiant # script/setup_database -e production
Run setup_database --help for information on additional options.

Loading production environment…FAILED
/usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in require__': no such file to load -- script/../config/../app/models/page (MissingSourceFile) from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:193:inload_environment’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:168:in
load_environment' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/kernel/reporting.rb:11:insilence_warnings’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:165:in
load_environment' from /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:82:inprocess’
from
/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:42:in
run' from ./script/../config/environment.rb:12 from script/setup_database:82:inload_environment’
from script/setup_database:255:in announce' from script/setup_database:81:inload_environment’
from script/setup_database:17:in run' from script/setup_database:9:inrun’
from script/setup_database:294

Maurizio B. wrote:

After having installed the gem (beta 2) and created an instance, when
I attempt to setup the database in production env I get the following
error (if I setup the database in default–or explicitly in
development environment I don’t get the error). Is there something
obvious I’m missing?

Good catch. There is a problem with config/environment/production.rb. It
tries to load page.rb from RAILS_ROOT. Change it to RADIANT_ROOT and it
should work fine.


John L.
http://wiseheartdesign.com

On 6/26/06, John W. Long [email protected] wrote:

Good catch. There is a problem with config/environment/production.rb. It
tries to load page.rb from RAILS_ROOT. Change it to RADIANT_ROOT and it
should work fine.

John, I moved a step further, but now I get this one:

electronicbusiness radiant # script/setup_database -e production
Run setup_database --help for information on additional options.

Loading production environment…OK

WARNING! This script will overwrite information currently stored in the
database “db/radiant_live.sqlite.db”. Are you sure you want to continue?
[Yn] y

Creating tables…
– create_table(“config”, {:force=>true})
FAILED
/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/errors.rb:94:in
check': could not open database (SQLite3::CantOpenException) from /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/database.rb:112:in initialize’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/sqlite_adapter.rb:17:in
sqlite3_connection' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in connection_without_query_cache=’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/query_cache.rb:54:in
connection=' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in retrieve_connection’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
connection' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/migration.rb:272:in method_missing’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/migration.rb:256:in
say_with_time' ... 7 levels... from script/setup_database:103:in create_tables’
from script/setup_database:19:in run' from script/setup_database:9:in run’
from script/setup_database:294

On 6/26/06, John W. Long [email protected] wrote:

Oh, right. Create the db directory.

:slight_smile: It is working OK now. Thank you.

P.S. I think the gem-based distribution of radiant is a very good
idea, because you install radiant just once (as a gem), keep it
updated easily (gem update radiant), and if you have multiple
radiant-based sites you don’t have to install the app again and again,
besides keeping it updated and in synch everywhere.

Maurizio B. wrote:

On 6/26/06, John W. Long [email protected] wrote:

Good catch. There is a problem with config/environment/production.rb. It
tries to load page.rb from RAILS_ROOT. Change it to RADIANT_ROOT and it
should work fine.

John, I moved a step further, but now I get this one:

Oh, right. Create the db directory.

Both of these issues are fixed in SVN. I just haven’t updated the gem
yet.


John L.
http://wiseheartdesign.com

On Jun 26, 2006, at 4:52 PM, Maurizio B. wrote:

On 6/26/06, John W. Long [email protected] wrote:

Oh, right. Create the db directory.

:slight_smile: It is working OK now. Thank you.

P.S. I think the gem-based distribution of radiant is a very good
idea, because you install radiant just once (as a gem), keep it
updated easily (gem update radiant), and if you have multiple
radiant-based sites you don’t have to install the app again and again,
besides keeping it updated and in synch everywhere.

Note that the downside is that with a unified installation, you have
to verify each of your sites all at the same time, instead of
separately. What if there’s a subtle change that affects some
assumption you’ve made in the code of one of your sites? Major source
of potential gotchas.

I’m not disagreeing that it’s a good idea, just mentioning that it’s
not necessarily all flowers and radiant sunshine.


Ryan P.
Senior Developer, SubscriberMail, LLC

3333 Warrenville Rd.
Suite 530
Lisle, IL 60532
(630) 303-5072

Not Just Email…SubscriberMail

This message (including attachments) contains proprietary information
which may not be disclosed or used beyond the purposes of this
message without the written consent of SubscriberMail, LLC. If you
receive this message in error, notify the sender and destroy this
message and all attachments immediately. Thank you.

SubscriberMail is covered under US PATENT 6,769,002

Maurizio B. wrote:

:slight_smile: It is working OK now. Thank you.

Awesome.

P.S. I think the gem-based distribution of radiant is a very good
idea, because you install radiant just once (as a gem), keep it
updated easily (gem update radiant), and if you have multiple
radiant-based sites you don’t have to install the app again and again,
besides keeping it updated and in synch everywhere.

I’m really excited about the gemification myself. I didn’t realize the
ramifications of it initially, but I think it will probably improve
adoption and easy administration. I’m really grateful that Lois Lavena
wanted this bad enough to push me to include it in the core.


John L.
http://wiseheartdesign.com

On 6/27/06, Ryan P. [email protected] wrote:

I’m not disagreeing that it’s a good idea, just mentioning that it’s
not necessarily all flowers and radiant sunshine.

:slight_smile: But we all know there is “No rose without a thorn” …

(except maybe some new GMO varieties …)

On 6/27/06, Luis L. [email protected] wrote:

Actually, each instance works separately, even its “bound” to a
specific gem version, like rails. So a site running against radiant
0.5.0 will co-exist with radiant 0.6.1 as long both gems are still
installed.

Luis, can you shed some light for me on this? For example, I’ve
created an instance with the beta-2 gen, which installs radiant 0.50.
At a later time I’ll update the gem (radiant version 0.61) and create
a second instance (for a new site). This new instance will use radiant
0.61. As far as I understand from your sentence above, will the
previously installed instance will continue to run on radiant 0.50? If
this is the case (a sort of “freeze” of the instance-specific radiant
version at installation time), is there a way to update (unfreeze) all
the installed instances?

On 6/26/06, Maurizio B. [email protected] wrote:

0.61. As far as I understand from your sentence above, will the
previously installed instance will continue to run on radiant 0.50? If
this is the case (a sort of “freeze” of the instance-specific radiant
version at installation time), is there a way to update (unfreeze) all
the installed instances?

Check into your 0.5.0 instance for config/instance.yml

There is coded the gem version of radiant that will be used. If no
database changes are introduced between versions, changing this and
saving will make your instance work with the new version.

The other way is using ‘radiant’ command in the instance, which will
extract the file needed for the new version into the already existing
instance.

A bit more intelligence should be into radiant command to determine
previous existance of a instance and blah blah blah… (hard work on
doing this).

I’ll post osme suggestions to John when have spare time for this,
always to enhance functionality.


Radiant mailing list
[email protected]
http://lists.radiantcms.org/mailman/listinfo/radiant


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

Hi Ryan,

On 6/26/06, Ryan P. [email protected] wrote:

radiant-based sites you don’t have to install the app again and again,
besides keeping it updated and in synch everywhere.

Note that the downside is that with a unified installation, you have
to verify each of your sites all at the same time, instead of
separately. What if there’s a subtle change that affects some
assumption you’ve made in the code of one of your sites? Major source
of potential gotchas.

Actually, each instance works separately, even its “bound” to a
specific gem version, like rails. So a site running against radiant
0.5.0 will co-exist with radiant 0.6.1 as long both gems are still
installed.

In case you don’t want it work as gem, svn checkout the radiant truck
and create a radiant instance that is bound to that source folder.

Both approaches works in similar ways.

(630) 303-5072
SubscriberMail is covered under US PATENT 6,769,002


Radiant mailing list
[email protected]
http://lists.radiantcms.org/mailman/listinfo/radiant


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

On 6/26/06, Maurizio B. [email protected] wrote:

  • issue a “radiant .” command for each site (radiant instance)
    Exactly, please excuse my bad english :wink:

radiant command is still a bit dumb to determine identical and updated
files into the instances to know what to do (it will ask you about
overwrite always, instead of skip the identical ones).

Will look into that later, but so far, “radiant” command proven to be
useful, at least for a few users (me included :wink:

Regards,


Radiant mailing list
[email protected]
http://lists.radiantcms.org/mailman/listinfo/radiant


Luis L.
Multimedia systems

Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

On 6/27/06, Luis L. [email protected] wrote:

radiant command is still a bit dumb to determine identical and updated
files into the instances to know what to do (it will ask you about
overwrite always, instead of skip the identical ones).

Will look into that later, but so far, “radiant” command proven to be
useful, at least for a few users (me included :wink:

It would be great if it will allow the user to request an action like:

[Yna]

(instead of [Yn]) so that you’ll be able to ovewrite [a]ll existing
files at once rather than only one by one.

Cheers. --M

Maurizio B. wrote:

[Yna]
Try:

% radiant --force .


John L.
http://wiseheartdesign.com

On 6/27/06, Luis L. [email protected] wrote:

A bit more intelligence should be into radiant command to determine
previous existance of a instance and blah blah blah… (hard work on
doing this).

Thank you for your clarification. I think the two methods you suggest
are both simple enough to be useful. So if I’ve understood correctly,
one way to proceed to align all radiant-based sites someone has on a
server with the latest radiant version, would then be:

  • update the gem (“gem update radiant”)
  • issue a “radiant .” command for each site (radiant instance)

On 6/27/06, John W. Long [email protected] wrote:

Try:

% radiant --force .

I overlooked it. :frowning: Thank you!