• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Rails on Plesk: Complete guide

Okay, here's what I've done to get Ruby on Rails going on my FC2 server with Plesk (not that that matters, plesk has nothing to do with it)

Followed these instructions verbatim

http://brainspl.at/pages/rails_stack

Minus the lighttpd, cuz I don't know how that would work with Apache Running.

Then I took into account the information from

http://ifakedit.com/log/2006/03/28/rails-on-fedora-plesk-fiasco/

Mainly in regards to fcgi

It's all quite simple now looking back at it... and restoring my server backup twice and 13 hours of work. But that's quicker than most of the other posters so hopefully all this will help others make it quicker and with fewer backup restores. I can't stress the Backup issue more!

So I was completely amazed to run a simple tuturial I found from
http://www.sitepoint.com/article/ruby-on-rails

to see Ruby / Rails working as it should. This is installed on the root of the system so it works on all domains, right now I only know that it requires SSH to run the commands so you'd have to do it for your users or give them SSH access.

I have not tested the MySQL component yet, I'll keep you posted and I am having trouble with SQLITE3. For such a simple and light program it's sure sticky to get going. I cannot do:
gem install sqlite
I get
"ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite-2.0.1 for inspection.
ruby extconf.rb install sqlite\nchecking for main() in -lsqlite... no
checking for sqlite.h... no
"
 
Originally posted by slaphost
"ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite-2.0.1 for inspection.
ruby extconf.rb install sqlite\nchecking for main() in -lsqlite... no
checking for sqlite.h... no
"

You'll probably want to do:

yum install sqlite-devel


and then try building again. same deal with mysql
 
I did try that. I am using A.R.T. yum repository and it cannot find package.
Not sure if this is because I'm on FC2 or if there's another repo that houses that package.

What repo are you using?
OS?
 
thanks, I changed yum.conf to their repo

then:

yum update
Gathering header information file(s) from server(s)
Server: Dag RPM Repository for older Red Hat Linux
retrygrab() failed for:
http://apt.sw.be/redhat/2/en/i386/dag/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://apt.sw.be/redhat/2/en/i386/dag/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found

I also tried to rpm apt (since it looks interesting)

rpm -ivh apt-0.5.15cnc6-4.1.fc2.rf.i386.rpm
error: open of <!DOCTYPE failed: No such file or directory
error: open of HTML failed: No such file or directory
error: open of PUBLIC failed: No such file or directory

I'm sure it's something simple... here's my yum.conf

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=0

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

# THIS CHANNEL CONTAINS MY PSA COMPATIBLE RPMS (php, mysql, qmail-scanner, etc)
#[atomic]
#name=Atomic Rocket Turtle - $releasever - Atomic PSA-Compatible RPMS
#baseurl=http://3es.atomicrocketturtle.com/atomic/art/$releasever/

[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

[dag]
name=Dag RPM Repository for older Red Hat Linux
baseurl=http://apt.sw.be/redhat/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

My previous yum.conf with A.R.T. did have a section for PSA-7.5, since I am on plesk 7.5, dunno if that means anything at all...
 
[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
#gpgcheck=1
enabled=1


thats the only DAG entry i have in my yum.conf and it works quite well.. hope this one works for you. looks like maybe the redhat ones are screwing yours up.. try removing them and only using this one for fedoracore
 
Awesome!

That worked, got that going BUT I actually need sqlite3, I didn't see it in the repo (i did see some other goodies in there so not a total loss)

Then I found sqlite3(-devel) here
http://slightly.off.net:8080/rc-fc2/vladfc2/fedora-2-i386/

Got that going, btw I recompiled Ruby, Gems just to be safe.

So everything seems to be going well, I test my Ruby app and get this:

ActiveRecord::StatementInvalid in List itemsController#index

ActiveRecord::StatementInvalid

I did gem install sqlite3-ruby without error, something's still not clicking. I'll probably dive into MySQL for RoR anyways since that will ulimately be my choice. Just slightly annoying that I can't get it all to work properly.
 
Back
Top