Distribute your Rails application as a Gem

Posted by stoyan Tue, 30 May 2006 01:30:00 GMT

1. Install fossilize plugin
$ ./script/plugin source http://opensvn.csie.org/mmediasys/trunk/rails/plugins/
$ ./script/plugin install fossilize
2. Create the default script and configuration for your application
# will create config/application.yml and bin/my_rails_app
$ ./script/generate fossilize MyRailsApp

3. Edit config/application.yml if needed (author name, email, gem version etc.)

4. Generate the gem (in pkg/ directory)
# will produce pkg/my_rails_app-x.y.z.gem
$ rake package
5. Usage
$ gem install my_rails_app
$ my_rails_app /path/to/install

Posted in SysAdmin, Gems, Ruby | no comments

Using TextDrive

Posted by sto Wed, 27 Oct 2004 14:24:00 GMT

During the last days accumulated some useful (maybe only for me) tips for using Text Drive

Common Security

created several users with specific permitions.
  • user1 : the default, coming with signup. Only MYSQL access for creating databases. Also email for annoncements.
  • user2 : only email access – sometimes the access is ove unsecure protocols (POP3 etc.). Subscribed it to the “Announces” and “Status” ML.
  • user3 : SVN, DAV access. Main development account. No emails
  • user4 : MYSQL only access – for using in rails, textpattern etc. No emails.

MySQL

the databases names need to be username_... From the signup email: for example, user-weblog would be a valid database name , but this not-working . Web interface on http://bgjap.net/mysql/ . Better access it with your primary user account when creating databases and with your database account for tables and entries.

Dav

access on http://bgjap.net/dav/ – require username@domain for authentication

Still haven't shell access so i tryed to work via the Webmin interface. Difficult :/

Rails

Webmin | Running Processes | Run…

rails /home/username/rails

Choice some directory
outside of web access one (public_html) Webmin | Apache Webserver | Aliases and Redirects | Document directory aliases: From: /rails To: /home/user/rails/public Edit _rails/public/.htaccess – add /rails before /dispatch. : my rails .htaccess . Access: http://domain/rails/controller_name – CGI, http://domain/rails/fcgi/controller_name – FastCGI, http://domain/rails/mruby/controller_name – mod_ruby (not working still for me). Creating containers and models: Webmin | Running Processes | Run…

cd /home/user/rails; script/new_controller Blog

End – this list entry is just because Textpattern have some problems when the last entry contains pre tag – the next paragraph also becomes part of the list !?

Not sure if there is instiki is preinstalled so i made my own install

Instiki

Uncompress the tarball somewhere outside of the web root: /home/user/instiki-0.9.1 for example Create storage directory inside (let' pickup port 3777 to run the wiki on): /home/user/instiki-0.9.1/storage/3777 Webmin | Running Processes | Run…

cd /home/user/instiki-0.9.1; ruby instiki.rb -p 3777

TODO: redirect wiki.domain.com → :3777

Posted in Gems | no comments | no trackbacks

[RoR] Disable page caching

Posted by sto Tue, 26 Oct 2004 13:49:00 GMT

In abstract_application controler:

before_filter { @headers["Cache-Control"] = 'no-cache' }

Posted in Programing, Gems | no comments | no trackbacks

Powered
Ruby Blogs Directory
Performa
Box.net Refer