Aug
2010
Test post
Test post
I’m attempting to set up another domain of mine to use the following:
Ruby
Ruby on Rails
Lighttpd
We’ll see how it goes…
After I upgraded to Wordpress, I noticed that the below error was displaying on the Dashboard:
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: this version of PCRE is not compiled with PCRE_UTF8 support at offset 0 ...
I did some searching, and came across this site where it gave me an idea of where to start looking. To resolve the issue, I upgraded PHP (for the heck of it) and upgraded Apache from 2.2.4 to 2.2.14. Apache v2.2.14 has PCRE v6.6 built-in, whereas before the upgrade it was using v5.5ish which was causing the problem. After doing this and making some adjustments to my httpd.conf file (I had to uncomment modules that I commented out) and restarting Apache, all was good.
I’m upgrading from b2evolution to Wordpress. Just due to the fact that Wordpress is simpler to use. And the upgrade process isn’t as atrocious.
I’ll be trying to get my previous updates imported asap.
*Edit* – Import complete. That was easier than I thought.
I had a little difficulty installing the MySQL gem for Ruby 1.9.1. I constantly received an error that said “/usr/local/lib/ruby/1.9.1/mkmf.rb:362:in `try_do’: The complier failed to generate an executable file. (RuntimeError) You have to install development tools first.”.
Well, after a couple of days of tinkering around on my server and several Google searches, the solution was found at the following site:
http://smangal.wordpress.com/2007/05/17/mysql-gem-on-centos/
If the above site is not available, the mysql-devel RPM had to get installed/updated. I did this through YUM. After getting that updated, the MySQL Ruby gem installed just fine.
I encountered an issue when trying to get WEBrick to start on my server:
[root@ip 13:07:59]script/server
/var/www/vhosts/nickthompson.name/httpdocs/emporium/config/boot.rb:18:in `require': no such file to load -- initializer (LoadError)
from /var/www/vhosts/nickthompson.name/httpdocs/emporium/config/boot.rb:18:in `
from script/server:2:in `require'
from script/server:2:in `
There was no such thing as a ‘initializer’ gem to install (and trying to install it via gem install did not work) and after much tinkering around, this problem was resolved by installing Rails to 2.3.5. An upgrade of RubyGems to 1.3.5 was also done prior to this, but I don’t know if this contributed to the issue getting fixed.
To embed Ruby code in your HTML documents (much like PHP or ASP), you can use eRuby. Installation of the software can be done manually by downloading the .tar.gz file from modruby.net or by using Subversion.
After it’s installed, you’ll need to edit your domain’s vhost.conf file in /var/www/vhosts/yourdomain/conf/ and put some information in there that tells the server how to interpret and process the Ruby code. The documentation for this can be found on the modruby.net site at http://wiki.modruby.net/en/?InstallGuide
Don’t forget to run the reconfigurator and restart Apache for the change (default location for reconfigurator is /usr/local/psa/admin/sbin/websrvmng).
I was always wanting to get Ruby scripts to run on my Plesk server, so after a bit of researching, I was able to do this through the use of mod_ruby, a slight modification to Apache’s httpd.conf file and adding some changes to the domain’s vhost.conf file.
Installation of mod_ruby can be found here: http://wiki.modruby.net/en/?InstallGuide
The section where it tells you to add the IfModule stuff needs to go into the domain’s vhost.conf file. The LoadModule line needs to get added to the area where all of your modules are defined in your server’s httpd.conf file.
*EDIT – I forgot to mention that when editing your vhost.conf file, you will need to run Plesk’s reconfigurator tool and restart Apache in order for the changes to take effect. The reconfigurator tool is located at /usr/local/psa/admin/sbin/websrvmng. You can either pass the -a and -v flags to reconfigure all sites or you can specify the specific site itself.
Here’s a simple one liner that will get you the sum of all of the bytes recorded in your access log (assuming that you are in the /var/www/vhosts/yourdomain/statistics/logs/ directory via SSH):
for i in `cat file_name | awk '{print $10}'`; do sum=$((i+=sum)); done; echo $sum
Replace file_name with the name of your access log.
Note: the above command will work on a CentOS5 server. If you are using any other Linux distro, make sure that the awk command is referencing the correct column.
I just recently upgraded Plesk to 9.2.1. Later on during the day that I performed the upgrade, I noticed that I was receiving more spam than usual. Today, I found that the SpamAssassin service was not running on my server, which explains everything.
So, if this happens to you, check the SpamAssassin service and see if its running. If it is not, start it. Simple as that.
You can find what’s new in Plesk 9.2 by clicking the link below: