Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: bloodshoteye on September 11, 2007, 10:46:48 PM
-
Hi all
I have a hiccup on upgrading SME Server 7.2's Ruby to Ver 1.8.5 as required by the Metadot 7 beta install (on the Howto Page). I can't create an a/c on the howto for some reason (repeatedly gives only a login dialog), so I am "forced" to ask here ;-)
If anyone has followed the steps (I know it's beta) could you perhaps explain why I get as far as:
# rails -v
Rails 1.2.3
but, when I do:
# gem install mongrel --include-dependencies
Select which gem to install for your platform (i386-linux)
1. mongrel 1.0.1 (mswin32)
2. mongrel 1.0.1 (ruby)
3. mongrel 1.0 (mswin32)
4. mongrel 1.0 (ruby)
5. Skip this gem
6. Cancel installation
> 2
Select which gem to install for your platform (i386-linux)
1. fastthread 1.0 (ruby)
2. fastthread 1.0 (mswin32)
3. fastthread 0.6.4.1 (mswin32)
4. fastthread 0.6.4.1 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby extconf.rb install mongrel --include-dependencies
can't find header files for ruby.
How is this possible if I get as far as this?
Any pointers welcome (Russell, if you read this you may feel inclined to respond?)
Thanks in advance,
Regards.
-
The reason why it wont install is because the gcc was not installed try running these command
yum install gcc-c++ libxml2-devel bzip2-devel curl-devel
then run
gem install mongrel --include-dependencies
Russell
-
Russell, I did as you suggested:
yum install gcc-c++ libxml2-devel bzip2-devel curl-devel
and that software was installed.
Then I ran:
gem install mongrel --include-dependencies
and that gave:
[root@ps rubygems-0.9.4]# gem install mongrel --include-dependencies
Need to update 0 gems from http://gems.rubyforge.org
complete
Select which gem to install for your platform (i386-linux)
1. mongrel 1.0.1 (mswin32)
2. mongrel 1.0.1 (ruby)
3. mongrel 1.0 (mswin32)
4. mongrel 1.0 (ruby)
5. Skip this gem
6. Cancel installation
> 2
Select which gem to install for your platform (i386-linux)
1. fastthread 1.0 (ruby)
2. fastthread 1.0 (mswin32)
3. fastthread 0.6.4.1 (mswin32)
4. fastthread 0.6.4.1 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby extconf.rb install mongrel --include-dependencies
can't find header files for ruby.
This is basically the same error except this time there was no need to update any gems.
-
Try uninstalling the gems with these commands and do the install again
to uninstall
gem uninstall -a mongrel
then press y
also remove fastthread
gem uninstall fastthread
Russell
-
Cant find gems:
gem uninstall -a mongrel
and
gem uninstall fastthread
# gem uninstall -a mongrel
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem mongrel-> 0
# gem uninstall fastthread
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem fastthread-> 0
So perhaps nothing was built?
Being somewhat of a noob, not sure where else to look...
-
Things to try
if you get this error message, then, it already has been uninstalled or wasn't installed at all
# gem uninstall -a mongrel
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem mongrel-> 0
gem uninstall fastthread
gem uninstall -a mongrel
gem uninstall rake
gem uninstall -a rails
yum remove ruby*.*
Follow the install procedures again
-
Hi Russell
Much time has passed. I'm again trying to update Ruby and Gems (on a re-install with all updates). I'm following your howto at Contribs.org.
This time I'm almost there, suddenly this:
# ruby setup.rb config
entering config phase...
config done.
# ruby setup.rb setup
entering setup phase...
setting #! line to "#!/usr/bin/ruby"
setting #! line to "#!/usr/bin/ruby"
/usr/bin/ruby extconf.rb
checking for sqlite_open() in -lsqlite... 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.
Provided configuration options:
--with-opt-dir
<snipped>
--without-sqlitelib
setup failed
'system /usr/bin/ruby extconf.rb' failed
try "ruby setup.rb --help" for usage
All previous set-ups to this point completed satisfactorily with no errors.
Then I deleted the ruby-dbi dir, re-downloaded the dbi-0.1.1.tar.gz file, extracted, etc. Same result.
Tantalizingly close. Can you help?
TIA
-
try skipping the dbi-0.1.1.tar.gz installation step and follow the rest of the instructions
Russell
-
Hi, Russell
try skipping the dbi-0.1.1.tar.gz installation step and follow the rest of the instructions
Apologies for lengthy post.
Did as suggested. Installing metadot password aborted:
# ./install --no-tests mwiki xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ install --mode=700 --directory metadot-on-rails-attachments
+ cd metadot-on-rails-attachments
+ tar -xf ../default_wiki_attachments.tar
+ cd ..
+ install --mode=700 --directory metadot-rails
+ cd metadot-rails
+ tar -xf ../wiki.tar
+ install --mode=700 --directory log
+ sed 's/metadot_/mwiki_/g; s/password:/password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ./config/database-sample.yml
sed: -e expression #1, char 77: unknown option to `s'
+ set +x
***************
*** ABORTED ***
***************
I used correct password (copy paste) from .mycnf
3 new db's were created: mwiki_development, mwiki_production and mwiki_test - all 0 tables.
Noticed this line from above
+ sed 's/metadot_/mwiki_/g; s/password:/password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I removed :password from line 90 of install (forgive presumptuousness)
re-running ./install still aborts, but at this point:
]# ./install --no-tests mwiki xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ install --mode=700 --directory metadot-on-rails-attachments
+ cd metadot-on-rails-attachments
+ tar -xf ../default_wiki_attachments.tar
+ cd ..
+ install --mode=700 --directory metadot-rails
+ cd metadot-rails
+ tar -xf ../wiki.tar
+ install --mode=700 --directory log
+ sed 's/metadot_/mwiki_/g; s/password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ./config/database-sample.yml
+ '[' 2 -gt 1 ']'
+ rake install database=mwiki username=root password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(in /opt/metadot7/metadot-rails)
+ rake db:migrate
(in /opt/metadot7/metadot-rails)
rake aborted!
Access denied for user 'root'@'localhost' (using password: NO)
(See full trace by running task with --trace)
+ set +x
***************
*** ABORTED ***
***************
This line from above is interesting
Access denied for user 'root'@'localhost' (using password: NO)
could that be because of removing (what appeared to me) to be a duplicate "password:" in install?
I don't really know what I'm doing, except I was trying to "trouble shoot" - please forgive if I'm barking up the wrong tree - feel somewhat foolish :-?
See if you can assist, please.
-
There was no need to edit the install script and I would advise masking the mysql password in your post
try chown -R www.www and also chmod 750 the directory where metadot is installed, maybe also check the file permissions on the install script, try changing them to 755
Russell
-
...and I would advise masking the mysql password in your post
Thanks for the password reminder. I sorted that.
There was no need to edit the install script ; try chown -R www.www and also chmod 750 the directory where metadot is installed, maybe also check the file permissions on the install script, try changing them to 755
<snip>
+ sed 's/metadot_/mwiki_/g; s/password:/password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
./config/database-sample.yml
sed: -e expression #1, char 77: unknown option to `s'
+ set +x
***************
*** ABORTED ***
***************
</snip>
I put back line 90 of install script as it was.
Response is same as originally reported.
What do you think this line from above indicates?
sed: -e expression #1, char 77: unknown option to `s'
-
OK, try this, this is my modified version, just been tested a my test server
Download sme-metadot7.0.7.tar.gz http://www.fixitcomputers.com.au/downloads/metadot_7/sme-metadot7.0.7.tar.gz (http://www.fixitcomputers.com.au/downloads/metadot_7/sme-metadot7.0.7.tar.gz)
cd /opt/metadot
tar xzvf sme-metadot7.0.7.tar.gz
Create these databases
mysqladmin create mwiki_development
mysql -e "grant all privileges on mwiki_development.* to mwikiuser@localhost identified by 'mwikipass'"
mysqladmin create mwiki_production
mysql -e "grant all privileges on mwiki_production.* to mwikiuser@localhost identified by 'mwikipass'"
mysqladmin create mwiki_test
mysql -e "grant all privileges on mwiki_test.* to mwikiuser@localhost identified by 'mwikipass'"
mysqladmin create mwiki
mysql -e "grant all privileges on mwiki.* to mwikiuser@localhost identified by 'mwikipass'"
cd /opt/metadot
./install --no-tests mwiki mwikiuser mwikipass
cd /opt/metadot/metadot-rails
ruby script/server
http://servername-or-ip:3000/
let me know how you go
Russell
-
let me know how you go
:-D Install completes. Very cool - the new metadot will be a hit - one thing:
When I kill the ssh shell where
ruby script/server
is running, the site goes down.
-
Hi all.
First off, thanks to all those who help others like me get ahead with SME Server and relevant add-ons.
In particular, thanks Russell for helping with this thread re Metadot 7.
Sme Server is a great product that deserves far more acclaim than it receives.
I going to give my 2c worth by linking to http://www.smeserver.org/ on my personal website and at least one other I'm developing for a senior school.
Both are running 7.2
I have a small question, please:
How can I turn the following command into a start-up service, so it becomes permanent through reboots, etc:
# ruby script/server
-
I am still working on that area, hopefully will have something soon, but if you would like to try it out for yourself, here are some links that might be of interest
http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails (http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails)
http://wiki.rubyonrails.org/rails/pages/HowToSetTheBaseURLsOfYourRailsApps (http://wiki.rubyonrails.org/rails/pages/HowToSetTheBaseURLsOfYourRailsApps)
Russell
-
I sometimes get things to work after blundering about for awhile, so don't count on me to work this one out, please.
Don't know if this may help:
The Openfire contrib has a pointer to a script installed in /opt/openfire/bin/extra during the Openfire server install. The script will create a daemon for itself that will restart the IRC server on reboot...
-
I sometimes get things to work after blundering about for awhile, so don't count on me to work this one out, please.
Don't know if this may help:
The Openfire contrib has a pointer to a script installed in /opt/openfire/bin/extra during the Openfire server install. The script will create a daemon for itself that will restart the IRC server on reboot...
I wish it was that easy
My understanding of it, is to create a template fragment similar to Metadot V6, will let you know when I got it worked out
Russell
-
updated beta, no need to create the database manually
http://www.fixitcomputers.com.au/downloads/metadot_7/sme-metadot.7.1.0.tar.gz (http://www.fixitcomputers.com.au/downloads/metadot_7/sme-metadot.7.1.0.tar.gz)
mkdir /opt/metdot7
cd /opt/metdot7
wget http://www.fixitcomputers.com.au/downloads/metadot_7/sme-metadot.7.1.0.tar.gz
tar xvzf sme-metadot.7.1.0.tar.gz
chown -R www.www /opt/metadot7
chmod 750 /opt/metadot7
chmod 755 install
you can create your own or use the example below
./install --no-tests metadot metadotuser metadotpass
cd /opt/metadot7/metadot-rails
ruby script/server
go to http://servername-or-192.168.1.1:3000/
Initial login:
email: admin@yoursite.com
password: admin123
Russell
russell@fixitcomputers.com.au
-
updated beta, no need to create the database manually
I presume I don't have to delete my db, just because I created manually?
I'm just needing a permanent start-up script
-
I have a small question, please:
How can I turn the following command into a start-up service, so it becomes permanent through reboots, etc:
# ruby script/server
For now why don't you put them into your /etc/rc.d/rc.local file every time it boots up, it will run this for you
As quoted for the file ...
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
Regards,
Tib
-
New
# ruby /opt/metadot7/metadot-rails/script/server returns error:
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
!!! Path to log file not valid: log/mongrel.log
mongrel::start reported an error. Use mongrel_rails mongrel::start -h to get help.
Exiting
Looks like Ruby was updated during the last lot of security fixes (not sure about gems) - darn, sorry guys, I didn't look at each package in the list, just went ahead.
# rails -v
Rails 1.2.5
The howto is for Rails 1.2.3 - Russell, should I re-run gems against this or re-install rubygems-0.9.4.tgz as per your original howto?
-
That error would occur if you have more than one Mongrel app running in the background
did you follow Tibs post on how start the service on startup, if so, might be a good idea to remove it
to check and see if your rails application is still running, go to your browser and open http://servername-or-ip:3000
Russell
-
I had tried Tibs idea, but the server didn't start - wasn't sure of what actually to put into the rc.local file. I tried an absolute pathname. I don't think that's correct.
Before I removed that, I tried a cli start - gave above error.
Now I followed your input, removed the entry from rc.local and restarted
Same error
-
what happened when you started your browser with http://servername-or-192.168.1.1:3000/ , did metadot load
Russell
-
No and
netstat -ant | grep 3000
returns nothing.
-
cd /opt/metadot7/metadot-rails
then run
rake
do you get any error messages
if none, try using this command to start metadot
ruby script/server -e production
if you get same errors
try
gem install cgi_multipart_eof_fix
Russell
-
do you get any error messages
# rake
(in /opt/metadot7/metadot-rails)
rake aborted!
undefined method `[]' for false:FalseClass
/opt/metadot7/metadot-rails/Rakefile:14
(See full trace by running task with --trace)
then I did:
gem install cgi_multipart_eof_fix
]# gem install cgi_multipart_eof_fix
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed cgi_multipart_eof_fix-2.3
Installing ri documentation for cgi_multipart_eof_fix-2.3...
Installing RDoc documentation for cgi_multipart_eof_fix-2.3...
No error here
Then rake:
# rake
(in /opt/metadot7/metadot-rails)
rake aborted!
undefined method `[]' for false:FalseClass
/opt/metadot7/metadot-rails/Rakefile:14
(See full trace by running task with --trace)
which is as above (in this message)
then i tried
metadot-rails# ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:201:in `establish_connection': undefined method `[]' for false:FalseClass (NoMethodError)
from ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:195:in `establish_connection'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:229:in `initialize_database'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:88:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:43:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:43:in `run'
from /opt/metadot7/metadot-rails/config/environment.rb:37
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
... 27 levels...
from ./script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require'
from ./script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
from ./script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:495:in `require'
from script/server:5
-
Sorry for all the issues, Russell, and thanks for the help so far, but I see this as a good way to iron out bugs in the howto, not so?
I need to go out now. It's 17h00 local time here in Cape Town.
I'll continue 08h00 my time tomorrow when I'm back in my cubbyhole.
-
I need to revive this in order to reach a conclusion, if I may?
do you get any error messages
yes - see previous message
and
if you get same errors
try...
same errors - see previous message
-
I do believe it could be due an incompatible ruby verssion, I have been looking for ruby 1.8.6 to go on sme
This is all I could find so far, I have not tested these yet
http://www.clyde-family.org/rhel4/i386/ (http://www.clyde-family.org/rhel4/i386/)
Russell