Project

General

Profile

Init Script for RedMine?

Added by Johnny Stork over 15 years ago

I have just installed RM on a CentOS 5.2 server, and can start it fine with

cd /opt/redmine
ruby script/server -e production

So I then tried the init script suggested here:

http://wiki.contribs.org/Redmine

But when I try to run I get....

[root@akitas redmine]# /etc/rc3.d/S99redmine start
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:636:in `report_activate_error': Could not find RubyGem mongrel (>= 0) (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:141:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem'
from /etc/rc3.d/S99redmine:9

So I thought it was imply missing mongrel, but trying to install mongrel I got this....

[root@akitas redmine]# gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mongrel
creating Makefile

make
gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC -c fastthread.c
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:31:21: error: stdlib.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:35:21: error: string.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:45:19: error: stdio.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:67:20: error: alloca.h: No such file or directory
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:11,
from /usr/lib/ruby/1.8/i386-linux/ruby.h:87,
from fastthread.c:12:
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i386-linux/ruby.h:693,
from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/missing.h:16:24: error: sys/time.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/missing.h:25:25: error: sys/types.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i386-linux/ruby.h:694,
from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/lib/ruby/1.8/i386-linux/intern.h:216: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:445: warning: parameter names (without types) in function declaration
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:703:21: error: pthread.h: No such file or directory
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:705: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rb_nativethread_t’
In file included from fastthread.c:13:
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: conflicting types for ‘rb_thread_select’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: previous declaration of ‘rb_thread_select’ was here
/usr/lib/ruby/1.8/i386-linux/intern.h:216: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:216: error: conflicting types for ‘rb_thread_wait_for’
/usr/lib/ruby/1.8/i386-linux/intern.h:216: error: previous declaration of ‘rb_thread_wait_for’ was here
/usr/lib/ruby/1.8/i386-linux/intern.h:445: warning: parameter names (without types) in function declaration
In file included from fastthread.c:14:
/usr/lib/ruby/1.8/i386-linux/rubysig.h:15:19: error: errno.h: No such file or directory
fastthread.c: In function ‘wait_condvar’:
fastthread.c:626: warning: passing argument 1 of ‘rb_ensure’ from incompatible pointer type
make: *** [fastthread.o] Error 1

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out

Any suggestions? Please forgive my ignorance, this is my first install of anything "Ruby".

Thanks :)


Replies (1)

RE: Init Script for RedMine? - Added by Johnny Stork over 15 years ago

Johnny Stork wrote:

I have just installed RM on a CentOS 5.2 server, and can start it fine with

cd /opt/redmine
ruby script/server -e production

So I then tried the init script suggested here:

http://wiki.contribs.org/Redmine

But when I try to run I get....

[root@akitas redmine]# /etc/rc3.d/S99redmine start
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:636:in `report_activate_error': Could not find RubyGem mongrel (>= 0) (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:141:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem'
from /etc/rc3.d/S99redmine:9

So I thought it was imply missing mongrel, but trying to install mongrel I got this....

[root@akitas redmine]# gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mongrel
creating Makefile

make
gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fno-strict-aliasing -fPIC -c fastthread.c
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:31:21: error: stdlib.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:35:21: error: string.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:45:19: error: stdio.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/ruby.h:67:20: error: alloca.h: No such file or directory
In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/include/syslimits.h:7,
from /usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:11,
from /usr/lib/ruby/1.8/i386-linux/ruby.h:87,
from fastthread.c:12:
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i386-linux/ruby.h:693,
from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/missing.h:16:24: error: sys/time.h: No such file or directory
/usr/lib/ruby/1.8/i386-linux/missing.h:25:25: error: sys/types.h: No such file or directory
In file included from /usr/lib/ruby/1.8/i386-linux/ruby.h:694,
from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/lib/ruby/1.8/i386-linux/intern.h:216: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:445: warning: parameter names (without types) in function declaration
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:703:21: error: pthread.h: No such file or directory
In file included from fastthread.c:12:
/usr/lib/ruby/1.8/i386-linux/ruby.h:705: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rb_nativethread_t’
In file included from fastthread.c:13:
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: expected declaration specifiers or ‘...’ before ‘fd_set’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: conflicting types for ‘rb_thread_select’
/usr/lib/ruby/1.8/i386-linux/intern.h:215: error: previous declaration of ‘rb_thread_select’ was here
/usr/lib/ruby/1.8/i386-linux/intern.h:216: warning: ‘struct timeval’ declared inside parameter list
/usr/lib/ruby/1.8/i386-linux/intern.h:216: error: conflicting types for ‘rb_thread_wait_for’
/usr/lib/ruby/1.8/i386-linux/intern.h:216: error: previous declaration of ‘rb_thread_wait_for’ was here
/usr/lib/ruby/1.8/i386-linux/intern.h:445: warning: parameter names (without types) in function declaration
In file included from fastthread.c:14:
/usr/lib/ruby/1.8/i386-linux/rubysig.h:15:19: error: errno.h: No such file or directory
fastthread.c: In function ‘wait_condvar’:
fastthread.c:626: warning: passing argument 1 of ‘rb_ensure’ from incompatible pointer type
make: *** [fastthread.o] Error 1

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.1/ext/fastthread/gem_make.out

Any suggestions? Please forgive my ignorance, this is my first install of anything "Ruby".

Thanks :)

Sorry, forgot to add this (somethings wrong I guess?)

[root@akitas redmine]# RAILS_ENV=production script/about
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rails/info (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/about.rb:2
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:3

    (1-1/1)