Ruby Gem "Install Scripts" failure

With a virtulamin pro license, am using Install Scripts option & have tried to install ROR 2 and also tried ROR 3. Both fail.

Installing Ruby Gem test-spec .. .. done Installing Ruby Gem camping .. .. done

Installing Ruby Gem fcgi .. .. Gem install failed : INFO: gem install -y is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Building native extensions. This could take a while... ERROR: Error installing fcgi: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql checking for fcgiapp.h... no checking for fastcgi/fcgiapp.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. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-fcgi-dir --without-fcgi-dir --with-fcgi-include --without-fcgi-include=${fcgi-dir}/include --with-fcgi-lib --without-fcgi-lib=${fcgi-dir}/lib Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.8 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.8/ext/fcgi/gem_make.out

Status: 
Active

Comments

Howdy -- does it help to install the fcgi-devel package?

You can do that by running this command as root:

yum install fcgi-devel

[root@mmgc ~]# yum install fcgi-devel Loaded plugins: fastestmirror, presto Loading mirror speeds from cached hostfile * base: centos.mirror.lstn.net * extras: mirror.steadfast.net * updates: mirror.nexcess.net Setting up Install Process No package fcgi-devel available. Error: Nothing to do

Before attempting to use VM Install Scripts, I was able to use "rails s" but now it does not work:

Related?

/usr/lib/ruby/gems/1.8/gems/execjs-1.3.2/lib/execjs/runtimes.rb:50:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (E xecJS::RuntimeUnavailable) from /usr/lib/ruby/gems/1.8/gems/execjs-1.3.2/lib/execjs.rb:5 from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:inrequire' from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1 from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in require' from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1 from /usr/lib/ruby/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:inrequire' from /usr/lib/ruby/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1 from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119:in require' from /home/bmgc/public_html/DO_Site/demo/config/application.rb:7 from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:53:inrequire' from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:53 from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:50:in tap' from /usr/lib/ruby/gems/1.8/gems/railties-3.2.3/lib/rails/commands.rb:50 from script/rails:6:inrequire' from script/rails:6

Hmm, that package should normally be in the repository. Which distro are you using, is it CentOS 6?

Also, what output do you receive if you type this command:

ls /etc/yum.repos.d/

Yes, centos 6

[root@mmgc ~]# ls /etc/yum.repos.d/ CentOS-Base.repo epel.repo virtualmin.repo virtualmin.repo.rpmnew vz.repo

After speaking with Jamie -- it sounds like the package you need is part of the EPEL repository -- we're looking into including that by default in the Virtualmin repository.

That said, it looks like you have EPEL setup there -- is the EPEL repository enabled? If not, and you enable it, you should then be able to run "yum install fcgi-devel".

You can enable it by editing the epel.repo file, and making sure that "enabled" is set to "1".

Progress! I chose a DB to use and it was not happy:

Now installing Ruby on Rails version 3.2.3 .. Database connection failed : DBI connect failed : Access denied for user 'mmgc'@'localhost' (using password: YES) 1360. .. failed! See the error message above for the reason why. Applying web server configuration .. .. done

<< Since it does not ask me to provide nor confirm the password, why is it not happy?

That error means that the password Virtualmin has for your database user isn't working for some reason.

If you know what the database password should be, what you could always do is go into Edit Databases -> Passwords, and reset the database password for your user.

If you have existing web apps using a database in this domain, make sure you're setting it to the password your existing apps think it should be.

Once you change your database password for that user, you should then be able to finish installing your script.

Changed the password and now get:

Now installing Ruby on Rails version 3.2.3 .. Rails SQLite driver install failed : INFO: gem install -y is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite-devel' and check your shared library search path (the location where your sqlite3 shared library is located). *** 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 --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib --enable-local --disable-local

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.6 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out .. failed! See the error message above for the reason why. Applying web server configuration .. .. done

Ok -- I did yum install sqlite-devel and think we're nearly there!

Ok - got further. But now:

Now installing Ruby on Rails version 3.2.3 .. Mongrel server did not start : ** Starting Mongrel listening at 0.0.0.0:3001 ** Starting Rails with development environment... ** Mounting Rails at /RAILS... /usr/lib/ruby/gems/1.8/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /usr/lib/ruby/gems/1.8/gems/execjs-1.4.0/lib/execjs.rb:5 from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:inrequire' from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1 from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in require' from /usr/lib/ruby/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1 from /usr/lib/ruby/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:inrequire' from /usr/lib/ruby/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1 from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119:in require' from /home/bmgc/public_html/RAILS/config/application.rb:7 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' from /home/bmgc/public_html/RAILS/config/environment.rb:2 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:inrails' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in cloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:incall' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in listener' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:incloaker_' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in call' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:ininitialize' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in new' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:inrun' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in run' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 from /usr/bin/mongrel_rails:19:inload' from /usr/bin/mongrel_rails:19 .. failed! See the error message above for the reason why. Applying web server configuration .. .. done

Joe's picture
Submitted by Joe on Sun, 06/03/2012 - 16:17 Pro Licensee

Just for reference, the fcgi-devel package is now in our repos. That won't resolve this issue, so I'm leaving it open for more work, but it does fix the dependency issue mentioned earlier in the thread.