Jump to content

Recommended Posts

Posted

I'm trying to install sqlite3-ruby, and since it has native extensions I'm unable to install it (see the error below). I'm also having difficulties with other gems (ones that require interaction for example), and most importantly, cannot take advantage of bundle's ability to have the source be github (for example. to have will_paginate work with rails 3, a newer version than the one on rubyforge is required).

 

How do I go about this?

 

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
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-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


Gem files will remain installed in /home1/onfreund/ruby/gems/gems/sqlite3-ruby-1.3.2 for inspection.
Results logged to /home1/onfreund/ruby/gems/gems/sqlite3-ruby-1.3.2/ext/sqlite3/gem_make.out

Posted

This RubyGem can be installed directly within cPanel.

 

In cPanel, choose 'RubyGems' then enter the necessary information.

Posted
This RubyGem can be installed directly within cPanel.

 

In cPanel, choose 'RubyGems' then enter the necessary information.

 

That's what I tried to do - the output I attached is from that attempt.

Posted

Interestingly enough, I had the same error trying to install sqlite-ruby... but sqlite3-ruby installed just fine. Is everything working for you now?

Posted
Interestingly enough, I had the same error trying to install sqlite-ruby... but sqlite3-ruby installed just fine. Is everything working for you now?

 

Thanks, that did the trick for sqlite. I'm still having trouble with other gems, though, and still don't know how to install gems from github. Is there any way I can "bundle install"? I'm afraid I'm going to be bothering you with more cases in the gem front.

Posted
I don't think you can bundle install. Can you try to install the packages one-by-one?

 

The point of bundler is that it allows gems to be installed from different sources (i.e. directly from git-hub) and different versions, and all with a single command. The RubyGems widget of cPanel doesn't seem to support it.

 

Perhaps I can use bundler through a cron task, but:

  1. I'm not sure if I'm allowed to
  2. I don't know how it will react if it needs user interaction.

How are others managing their "problematic" gems? will_paginate, for example, is very common, and the version available in cPanel is not compatible with rails 3.

 

Posted
Okay, let me know which commands you need me to run.

 

Basically you need to run "bundle install" (preferably as my user), from the root folder of my rails application (I only have one, the other is empty). Note that one of my dependencies is RMagic, which can be problematic to install (and has a dependency on ImageMagic), and on the other hand is quite popular, so I would suggest installing it system wide if possible, before running bundle install.

Let me know if there's anything I can do to help.

Posted

I won't be able to run it as you... but I can try as me. Alternately, if it's just that single command you can try via cron.

 

I'll need your HelioHost username.

Posted
I won't be able to run it as you... but I can try as me. Alternately, if it's just that single command you can try via cron.

 

I'll need your HelioHost username.

 

I'm pretty certain that cron won't be a good idea, can't you su to my user name? (it's onfreund, btw).

If not, I guess that running as root might work, but in which case it will install those gems system wide (this actually might be a good idea for at least some of them, such as will_paginate and RMagic).

Posted

I can't su as you because shell is disabled for users... running commands from a tty is disabled.

 

I went ahead and ran your "bundle install" command as root. Is everything running as expected at this point?

Posted

Thanks. We're almost good. The only problem is the two gems that were installed through GitHub - it seems that bundler installs those into the user's home dir, which would be root, instead of me in our case. I'm guessing that there should be some folder named .bundler or .bundle in root's home dir now. Can you copy it to my home dir and give me permissions?

 

I really appreciate all of your help so far (that goes out to Wizard and jje as well) - this is way better service than I expected for a free host!

 

On second thought, now that most gems are installed, running bundle install through cron will probably do the trick. I'll try that and see if I can manage without further assistance, and will let you know.

 

UPDATE: I've tried to run a cron task - it seemed to have no affect, and I can't access the webmail interface, so I have no way of knowing what happened.

 

Thanks

Posted

OK, so my cron task did manage to run, but it couldn't get the gems, because git is not installed:

 

Fetching http://github.com/mislav/will_paginate.git
sh: git: command not found

Guest
This topic is now closed to further replies.
×
×
  • Create New...