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
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.
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.
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
I'm looking for a mobile app in ruby
DAve
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.
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
config.action_controller.relative_url_root = "your_root"
Originally found on http://giantrobots.thoughtbot.com/2009/4/15/rails-2-3-2-upgrade-gotchas
In response to: File upload in Rails
sack [Visitor]
you should append the following line to the end of the solution:
tempfile.rewind
tempfile.rewind
In response to: Ruby on Rails: Testing with multiple databases
Brian [Member]
No significant notice. Both databases are running on the same mysql instance.
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?
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.
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.
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..!
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..!
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
brian@briansblog.net
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...
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
In the migration:
t.column :myFile, :binary
To save it, you would do something along the lines of:
myObject.myFile = @realFile.read
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...
I always get a weird error trying that...
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.
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.
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.
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.
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.
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.
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.
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....)
What happens when you run 'rake test'? (Hint: the database connection used for User doesn't change....)
Recent Comments