Typo with installer

Posted by stoyan Fri, 07 Jul 2006 04:54:00 GMT

Without a lot of noise there is a new version of everybody’s favourite blog engine – Typo. It including also an installer, which lets us following the no-step3-way :
$ gem install typo
$ typo install /tmp/typo
Like always with RoR, there is no step 3 ;) you have you blog ready to go.

What else give us the new Typo:

  • no need to downgrade your Rails environment – working without problems with the current Rails version
  • production ready – the new installer making mass-producing pretty easy – creating database(sqlite3 by default), choosing the random port etc.
  • Mongrel friendly – it started mongrel_rails, not webrick. Can be changed from installer/rails_installer_defaults.yml
  • jabber and email notifications – that one is pretty good I think. I need to study more the implementation.

Posted in Programing, SysAdmin, Ruby | no comments

ActiveMailer sending via GMail

Posted by stoyan Tue, 27 Jun 2006 08:03:00 GMT

On the previous Kansai Rails Conference in Asiyagawa somebody asked me about using GMail (smtp+ssl or tls) with Rails ActiveMailer. Didn’t find solution until now but ‘dza-dza-dzaaaaaaan’ (hahaha i’m not so smart, all credits going to entombedvirus ):

Send email with ActionMailer through TLS only SMTP server

So for Debian (Ubuntu):

Install msmtp (light SMTP client with support for server profiles)

$ sudo apt-get install msmtp

Create/edit ~/.msmtprc

account gmail
host smtp.gmail.com
auth on
user <your_account>@gmail.com
password <your_password>
tls on
tls_starttls on
from <your_account>@gmail.com
maildomain gmail.com
account default : gmail

Stop msmtp complaining about permissions

$ chmod 600 ~/.msmtprc

Add on the bottom of yourrailsapp/config/environment.rb (and comment another ActionMailer::Base.delivery_method settings if exists)

ActionMailer::Base.delivery_method = :msmtp

module ActionMailer
  class Base
    def perform_delivery_msmtp(mail)
      IO.popen("/usr/bin/msmtp -t -C /<path_to>/.msmtprc -a gmail --", "w") do
 |sm|
        sm.puts(mail.encoded.gsub(/\r/, ''))
        sm.flush
      end
    end
  end
end

Do not forget to fix the exact path to your .msmtprc in the source above.

Posted in SysAdmin, Ruby | no comments

RailsConf 2006 Summaries

Posted by stoyan Mon, 26 Jun 2006 15:13:00 GMT

A nice summaries of the RailsConf2006 sessions by Nick Sieger.

update (seel also):

Posted in Ruby | no comments

WebDAV Ruby On Rails Plugin

Posted by stoyan Sun, 25 Jun 2006 17:20:00 GMT

Via liverail.net :

I’m releasing the first version of the RailsDAV plugin . What does RailsDAV do. Well it allows people to create Ruby On Rails controllers which will respond to WebDAV requests and expose functionality as a file-system.

Uhoo, finally. Now I can access my Rails applications not only with browser, but also mount them from the OS X Finger or like Windows Network Disks.

Pretty cool. I’m waiting also for the changes in the Rails itself, to support PUT and DELETE in addition to GET and POST, changes DHH promised to us in Tokyo.

Posted in Ruby, SysAdmin | no comments

Litespeed+mongrel+HTTPS

Posted by stoyan Tue, 20 Jun 2006 06:12:00 GMT

Great news from LiteSpeed Technologiesafter a post to the forum they have ”X-Forwarded-Proto: https” AUTOMATICALY added to the headers, when proxing requests, initially comming via HTTPS. Now Rails applications are not confused, when doing redirects for HTTPS. Good to be added to Litespeed+Mongrel docs .

The litespeed-2.1.17 is already available for download (even still there is no announce).

Posted in Ruby, SysAdmin | no comments

Rails "one-click" installer for Debian Sarge

Posted by stoyan Fri, 16 Jun 2006 02:32:00 GMT

- Add to your /etc/apt/sources.list :
deb http://rails.netlab.jp/debian sarge rails
- Install Rails
$ sudo apt-get update
$ sudo apt-get install rails
- There is no step 3 ;)

And if your question is “who the hack made this package?”, it’s NaCl – the company where Matz is working :)

Posted in SysAdmin, Ruby | 2 comments

RubyKaigi2006 with DHH (2)

Posted by stoyan Mon, 12 Jun 2006 17:09:00 GMT

Finally home. Notes about the second Japan Ruby Conference 2006 day are ready and online. Also some conference days photos .

Posted in Ruby, Fun | no comments

RubyKaigi2006 - day first

Posted by stoyan Sat, 10 Jun 2006 15:31:00 GMT

I put some notes about Japan Ruby Conference 2006 on my wiki . DHH is here! Stay tuned…

Posted in Ruby | no comments

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

TDD? BDD?

Posted by stoyan Tue, 02 May 2006 06:33:00 GMT

Test Driven Development (TDD) has you define the behaviour of your system by writing small tests that precisely define some small piece of your system’s behaviour. Then you implement that behaviour. Then you clean up and improve your design…It is no surprise that it takes beginners some time to get to the understanding that TDD isn’t about testing at all...if they ever do.

How true!!! Until today I didn’t pay much attention to the TDD. Like most people my opinion was ”Why to lose time for testing my small programs. Some day…on bigger project…maybe”. Oh no…I was sooo far from the true. But I’m going to change…

Everything started from a post in the Dave Astel’s blog: A New Look at Test Driven Development . He explain very well my and maybe other people’s confusion about TDD - all these Test class names, trying to test every class and method (1-1 relationship) etc. In the same post he is proposing a new look on the same problem – writing specifications of what your code will have to do. The name for this new look is Behaviour Driven Development . It’s already implemented in Ruby – the RSpec framework . For bad luck there is still not good Rails support in it.

So on first time I’ll start with the old, but well supported rails testing framework. A very good starting point: Putting REST on Rails – step by step REST implementation. The article itself is better to be tryed with Rails 1.0, because Rails 1.1 way for implementing REST is different and seems easier. But the flow of creating the application is good. I’ll try to follow it.

Posted in TDD, Ruby, Programing | 3 comments

Older posts: 1 2 3 4 ... 9

Powered
Ruby Blogs Directory
Performa
Box.net Refer