Latest comments

In response to: Mongrel and Apache

Brian [Member]
You can find it here: http://briansblog.net/blog1.php/2008/02/04/rewrite-and-apache-1
PermalinkPermalink 11/02/09 @ 09:51

In response to: Mongrel and Apache

Jonathan Rochkind [Visitor]
Hi, where is your "last post" where you talk about the first four lines? Having trouble finding it.
PermalinkPermalink 11/02/09 @ 09:49

In response to: Mobile Ruby - cool stuff

Brian [Member]
Not advertising per say, I do work there so I can't be considered impartial. It is definitely cool to use and develop apps quickly that work on multiple mobile platforms.
PermalinkPermalink 07/01/09 @ 20:20

In response to: Mobile Ruby - cool stuff

Dave [Visitor]
when you say plug, are you advertising?
I'm looking for a mobile app in ruby

DAve
PermalinkPermalink 07/01/09 @ 19:48

In response to: Mongrel and Apache

Brian [Member]
Thanks for the update. These days I would use passenger and apache instead of mongrel, it is much faster and integrates better. However if you are running a server on windows, you will still have to use mongrel as passenger doesn't run on win32.
PermalinkPermalink 06/05/09 @ 23:31

In response to: Mongrel and Apache

Ed Sumerfield [Visitor] · http://edsumerfieldconsulting.com
Thanks for the help however the same fix for Rails 2.3.2 requires this addition to environment.rb instead.

config.action_controller.relative_url_root = "your_root"

Originally found on http://giantrobots.thoughtbot.com/2009/4/15/rails-2-3-2-upgrade-gotchas
PermalinkPermalink 06/04/09 @ 11:18

In response to: File upload in Rails

sack [Visitor]
you should append the following line to the end of the solution:
tempfile.rewind
PermalinkPermalink 04/22/09 @ 06:02

In response to: Ruby on Rails: Testing with multiple databases

Brian [Member]
No significant notice. Both databases are running on the same mysql instance.
PermalinkPermalink 03/30/09 @ 02:11

In response to: Ruby on Rails: Testing with multiple databases

Joe [Visitor] · http://www.inc21.com
Cool stuff. Does using a different database for testing hinder the performance of your tests?
PermalinkPermalink 03/26/09 @ 16:09

In response to: Mechanize for page scraping facebook.

Brian [Member]
It is possible to do this, as it is just another form that is in the middle. All you would have to do is detect that the page showed up and click the button.

I have not yet tested this script with the new facebook, I expected there will need a few changes due to the volatile nature of page scraping.
PermalinkPermalink 11/20/08 @ 15:25

In response to: Mechanize for page scraping facebook.

Damo [Visitor] · http://dadasoul.com
"Once you have done this, you can now access any app pages that are on facebook. Some apps are flash based, others are plain html and javascript."

What if you want to automate 'allow' application access..?
Would be nice if you could click the allow access for the application so you didn;t have to loing and 'allow' access..!
PermalinkPermalink 11/19/08 @ 04:25

In response to: File upload in Rails

Brian [Member]
Send me an email with your error messages and logs, I might be able to help you figure it out:

brian@briansblog.net
PermalinkPermalink 05/20/08 @ 21:46

In response to: File upload in Rails

Alien [Visitor]
Thanks for the answer, that was just what i made, but when i did the object.save, mysql report an error, and WEBrick crashes, something weird happens...
PermalinkPermalink 05/18/08 @ 17:58

In response to: File upload in Rails

Brian [Member]
While I have never done that, migrations have a field call 'binary' which would probably do the trick

In the migration:

t.column :myFile, :binary

To save it, you would do something along the lines of:

myObject.myFile = @realFile.read
PermalinkPermalink 05/18/08 @ 00:06

In response to: File upload in Rails

Alien [Visitor]
Hi, what about saving files to the database?
I always get a weird error trying that...
PermalinkPermalink 05/17/08 @ 21:06

In response to: File upload in Rails

Brian [Member]
If you check a couple posts back, I talked about windows and binary mode. I have patched my Tempfile to do that by default already.

The part here that is confusing me is why I should need to do a rewind on the StringIO before reading it. That and the fact that you have to deal with uploads in 2 ways depending on the file size.
PermalinkPermalink 05/17/08 @ 09:31

In response to: File upload in Rails

Luis Lavena [Visitor] · http://blog.mmediasys.com
The main issue you show here is related to the way files are being handled under Windows.

By default Ruby open files in text mode ('w'), that works under POSIX but under Windows, you need the binary 'b' for the mode or call #binmode as you did.

There are several patches for Tempfile under Windows, some of those came from Rails, try googling for that if you need more info.
PermalinkPermalink 05/17/08 @ 06:12

In response to: Ruby on Rails: Integrating with existing databases

Brian [Member]
See my latest post on how I fixed my unit tests.

I will be working on all my test in the future and get this thing reasonably tested as pretty much all I had was the scaffold generated tests unchanged.
PermalinkPermalink 02/21/08 @ 11:38

In response to: Ruby on Rails: Integrating with existing databases

Brian [Member]
Interesting, I guess I'll have to figure out how to fix that one. Stay tuned.
PermalinkPermalink 02/21/08 @ 10:01

In response to: Ruby on Rails: Integrating with existing databases

Shalon Wood [Visitor]
Danger, Will Robinson!

What happens when you run 'rake test'? (Hint: the database connection used for User doesn't change....)
PermalinkPermalink 02/20/08 @ 18:32
Originaly designed and iconized by N.Design Studio. Ported to b2evolution by Tender Feelings