Nitro is a framework for developing web applications using Ruby and Javascript.
Ajax
nitro
ria
curl
curlcoverage
silverlight
technologycomparisons
It now has been 2 years since Oxyliquit first breathed the air.
Oxyliquit has been the idea of a community platform, however - the diminishing positive response in large attributable to the withering of Nitro and Og support in general leaves me with one laughing and one crying eye.
As this is a completely community driven application, it lives and dies with its community.
That said, I still think Oxyliquit is a good source for Nitro, so it will stay as long as there are still interested people browsing through it, it might however reopen in a slightly different form.
I thank everyone who has ever contributed to Oxyliquit in any way. Thank you.
I'm terribly sorry for showing this RSCDS page the whole week. I do not plan to discontinue serving the Nitro Q&A system anytime soon.
I apologize again for the inconvenience.
Jonathan Buch
The Nitro concept of elements is terribly flexible. Whatever you put inside the elements tag is available through the content method. You could for instance parse this as YAML and take it as configuration for how the element should render.
variant: big
background: #3f7
no-footer: true
class SomeElement
def render
opt = YAML::load(content)
if opt['variant'] == 'big'
...
end
end
If you're using any characters beside those uses in 7-bit ASCII you'll have to think about character encodings. The easiest thing nowadays is usually to make every subsystem use UTF-8. To make Ruby use UT8 add $KCODE="UTF8" to app.rb. Make sure to add it all the way at the top, before loading Nitro. Then "charset=utf-8" will be added to the headers of a html response. If you set $KCODE after requiring Nitro this does not work!
I'm assuming you've installed Lighttpd with the package manager of your distribution of choice. Next you need to enable the fastcgi module.
If you're using Debian or a variant (like Ubuntu) you can use the lighty-enable-mod script:
lighty-enable-mod fastcgi
This will create a symlink from /etc/lighttpd/conf-available/10-fastcgi.conf to /etc/lighttpd/conf-enabled/10-fastcgi.conf. Open this file in your editor. If this doesn't work for you simply edit the main configuration file /etc/lighttpd/lighttpd.conf.
To enable the module you need this line:
server.modules = ( "mod_fastcgi" )
If you find any fastcgi.server portions in the configuration comment them out, we won't be needing them. Now add a fresh portion:
fastcgi.server = ("" =>
((
"bin-path" => "/path/to/app.rb",
"socket" => "/tmp/nitro.socket",
"check-local" => "disable",
"max-procs" => 1,
"bin-environment" => ("RUBYOPT" => "-rubygems -I/path/nitro_repo/script -rlib/glycerin")
))
)
Issue
sudo /etc/init.d/lighttpd force-reload
and you should be all set. Keep an eye on /var/log/lighttpd/error.log in case stuff doesn't work right.
Adapt bin-environment to whatever is necessary on your site to get nitro running. I'm assuming you're using the repo version. Otherwise a simply "-rubygems" might suffice.
Assuming that you've already installed Ruby and MySQL on your system
1) Download Darcs from www.darcs.net and decompress it in any directory
2*) Add the darcs root folder in the PATH environmental variable (i.e. C:\Darcs;)
3) Download the latest Nitro version from the repository through darcs by:
going to the directory you want to store nitro and
typing in command line: darcs get --partial http://repo.nitroproject.org nitro
4) Find the RUBYOPTS environmental variable (it should already contain -rubygems in it and after it add the following:
-I(NITRO)\nitro\lib -I(NITRO)\nitro\vendor -I(NITRO)\og\lib -I(NITRO)\glue\lib -I(NITRO)\raw\lib
5) Add the same directories in the PATH environmental variable as well
(ex. C:\nitro\nitro\lib;C:\nitro\nitro\vendor;C:\nitro\og\lib;C:\nitro\glue\lib;C:\nitro\raw\lib)
6) Go to the Nitro root directory and type: darcs pull and select "yes" to all patch prompts
7) Install the "facets" gem (gem install facets)
8) Install the "redcloth" gem (gem install redcloth)
9) Install the "xmlSimple" gem (gem install xml-simple)
10) Install the "mysql" gem (gem install mysql) [Select option 1]
11) Install the "uuidtools" gem (gem install uuidtools)
Properties. Select the Advanced Tab and on the bottom click on the Environmental Variables button.h2. Configuration
#
# Using Apache 2.0 and 2.2 as a reverse proxy
# for a Nitro application.
#
# Note that Apache 2.2 offers a load balancing
# proxy. Oxyliquit tutorial forthcoming...
#
# This scheme is based on Apache's NameVirtualHost
# feature. The following line should appear
# in your httpd.conf file:
#
# NameVirtualHost *:80
#
# Next, add the following.
#
# You *could* put this directly in httpd.conf.
#
# But with large numbers of virtual hosts,
# it makes sense to have an include directory
# under your_apache_install/conf and add this
# to httpd.conf:
#
# Include conf/vhosts/*
#
# or
#
# Include conf/vhosts/foo.com
# Include conf/vhosts/bar.com
#
ServerName myhost.com
ServerAlias www.myhost.com
ServerAlias myalias.net
ServerAlias www.myalias.net
RewriteEngine On
ProxyRequests off
ProxyPass / http://127.0.0.1:9001/
ProxyPassReverse / http://127.0.0.1:9001/
ProxyPreserveHost on
# If your application exposes administrative URLs that
# you want to protect, then you can redirect to an ssl
# port on the server.
RewriteRule ^/admin(.*) https://admin.myhost.com/admin$1 [L,R]
RewriteRule ^/(.*) http://127.0.0.1:9001/$1 [L,P]
#
# If you want an SSL port for secure URLs for your app,
# create an additional vhost
#
# Again, remember to add this somewhere before it:
#
# NameVirtualHost *:443
#
ServerName admin.myhost.com
ServerAlias topsecret.myhost.com
ProxyRequests off
ProxyPass / http://127.0.0.1:9001/
ProxyPassReverse / http://127.0.0.1:9001/
ProxyPreserveHost on
AuthName "Restricted Access"
AuthType Basic
Require user YoursTruly
AuthUserFile /top/secret/path/htpasswd
AuthName "Restricted Access"
AuthType Basic
Require group SiteEditors
AuthUserFile /top/secret/path/htpasswd
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4 RSA: HIGH: MEDIUM: LOW: SSLv2: EXP: eNULL
SSLCertificateFile /path-to-cert-files/ssl.crt/self_signed.cert
SSLCertificateKeyFile /path-to-cert-files/ssl.key/self_signed.key
SSLOptions FakeBasicAuth ExportCertData CompatEnvVars StrictRequire
Is there a simple way to get the Og admin part to stop stripping HTML markup from submitted text fields?