Archive

Posts Tagged ‘passenger’

Missing netbeans passenger support - patch integrated to trunk

March 10th, 2009

In one of previous posts (Missing netbeans passenger support - patch ready) I have informed that the patch is ready.

I just got information that the patch was integrated to the netbeans trunk, currently there is no nightly build available but I will post a message when this is ready.

Hope that we can play with passenger in Netbeans shortly.

Development , , ,

NICZ SOFT Rails hosting started

February 12th, 2009

Additionally to already started blog hosting we have started a new service - Rails hosting.

Basic Configuration is one instance of rails in passenger, one mysql database, and 500MB disk space limit, everything with ssh access.

Anybody interested should leave a note via one of available contact options.

Hosting, News , , , ,

Missing netbeans passenger support - patch ready

February 11th, 2009

I have just posted a patch that should enable  passanger support in netbeans, details can be viewed at netbeans issues.

Hope that will be shortly merged and everybody can use it.

I do not even know if this is fully functional, I got cold and had few other tasks on head, but this should be good start point.

Most of the logick required to get it running is already writen, so should be enough.

Development, Linux , ,

Missing netbeans passenger support

February 8th, 2009

Netbeans is missing very important (for me) functionality - support for setting passenger as server. This is even described at netbeans issues: http://www.netbeans.org/issues/show_bug.cgi?id=135447

As I could not find any project that does this job I have already started codding, currently it’s only few lines, but I should get “something” shortly, please let me know if anyone is interested in testing or supporting me in anyway.

Development , ,

Preparing Ruby on Rails environment - using apache for development

February 6th, 2009

In previous post we have created first rails application, it was tested using WEBrick which is part of rails environment. To have environment more similar to server environment and to get rid of keeping track of started projects we will switch to running applications with apache and passenger. There are some benefits of this configuration:

  1. Possibility to run all applications with only one server,
  2. Easy to share applications on local network or even to Internet,
  3. Fast detection of problems with compatibility to passenger,
  4. There are probably more benefits, If You know them leave me a comment.

So lets start with configuration, on beginning turn off apache:

/etc/init.d/apache2 stop

As a central point of configuration we will use ~/public in my case it is /home/mpapis/public, we need to create this directory:

mkdir /home/mpapis/public

Configure Your /etc/hosts to have some meaningful name for running it in the browser, so edit /etc/hosts and modify Your localhost line to look similar to this one (added rails):

127.0.0.1       localhost  rails

We need to configure apache to respond to our requests, first remove or backup default vhost configuration:

cd /etc/apache2/vhosts.d

mv 00_default_vhost.conf 00_default_vhost.conf.old

After getting rid of default configuration we can edit apache/passenger configuration file created in one of previous posts /etc/apache2/vhosts.d/01_passenger.conf:

LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6
PassengerRuby /usr/bin/ruby18

Listen 127.0.0.1:80
NameVirtualHost 127.0.0.1:80
UseCanonicalName Off
<VirtualHost 127.0.0.1:80>
DocumentRoot /home/mpapis/public
ServerName rails
ServerAlias localhost
RailsEnv development
Include /home/mpapis/public/paths.conf
<Directory “/home/mpapis/NetBeansProjects”>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory “/home/mpapis/public”>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

One of the lines defines that we will use /home/mpapis/public/paths.conf as part of the configuration, and this is the contents of this file:

RailsBaseURI /RailsApplication1

As we pointed /home/mpapis/public in previous file as document root and /RailsApplication1 as path of our application we need to create symbolic link to our application:

ln -s /home/mpapis/NetBeansProjects/RailsApplication1/public/ /home/mpapis/public/RailsApplication1

Last step is to notify our application that it will no more run from the / path, so we add the following entry to /home/mpapis/NetBeansProjects/RailsApplication1/config/environments/development.rb:

config.action_controller.relative_url_root = “/RailsApplication1″

That’s all, we can start appache now:

/etc/init.d/apache2 start

And if it is desired add it to autostart (to have our applications available just after system boot):

rc-update add apache2 default

Finally we can check work of our application by navigating in web browser window to the following path:

http://rails/RailsApplication1/

Looks pretty nice, in next step we will need to automate this a bit to avoid manual work each new project:

Rails try to follow DRY which stands for “don’t repeat yourself”.

Development, Linux , , , ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes