Stedwick | 16 May 03:27
Picon

Combine old migrations?


How do I take, say, 20 of my older migrations and wrap them up into
only a single one in order to clean up my directory?  Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

joel | 16 May 02:44
Picon

Fleximage problem


Hello,

I'm using squeegy fleximage for image upload and rendering. My
controller action code looks like this :

	  def showimg
		@promo = Promotion.find(params[:id])
		respond_to do |format|
			#format.png  { image_tag @promo.file_path(@promo) }
			format.html { render :inline => "@promo.operate {|p| p.resize
'30x30'}", :type => :flexi }
			#format.xml  { render :xml => @promo }
		end
	  end

However I'm having much difficulty rendering the image; I'm using the
following code in my view ;

	<div>
		<%=
render_component(:controller=>'promotions',:action=>'showimg',:id=>promotion.id)
%>
	</div>
And this view actually doesn't correspond to the correponding view of
the above controller action code.The url corresponding to the above
controller action however displays very well my image, but I'm having
very much difficulty to display it in this view.
Instead of having my image, i'm having some binary data, quite a messy
thing. I'm asking myself whether this doesn't have to do with the
(Continue reading)

wickNbomb | 16 May 02:10
Picon

Copenda.com - How Are They Doing This?


Does anyone have any thoughts on how Copenda is pulling off search
results like this?

http://www.copenda.com/SearchResults.aspx?gender=1&lookingfor=2&ageMin=29&ageMax=36&locatednear=CAMPBELL,%20CA&distance=10&savesearch=1&searchsafe=1&advancedsearch=0&showSearchBox=true

I've looked through the Myspace API docs and from what I can tell you
can only pull info for a specific user and they don't support any kind
of global search like this result...

Are they page scraping into their own model and THEN querying against
that?

Just curious as I've never come across this sort of implementation
before.

Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Roger Pack | 16 May 01:49

[ANN] RailsRestarter v 0.0.1 version "slow monkey"


Don't know if something like this exists already, but thought I'd
advertise my script :)

Introduction

Rails is slow. Rails in development mode on old computers is WAY slow.
There is hope, however. Just run it in production mode [fast!] and have
it restart whenever a file change occurs. Slow to restart, perhaps, but
far faster than reloading all files per request, which is development
mode.  This allowed me to develop in rails on my 1 GHz PPC [like 6 years
old] and still consider it survivable.

How to get/run:

code:
http://code.google.com/p/ruby-roger-useful-functions/source/checkout
buried in here is rails/rails_useful.rb, which contains a function

def fire_up_file_modification_checker_thread reload_dirs =
['app/controllers', 'app/schools', 'app/models'], death_dirs =
['app/helpers', 'config',
'app/controllers/shared_search_code_module.rb']

so put that file in your lib dir, include it in your environment.rb,
and, if it's like mine, add something like this to environment.rb

require 'lib/rails_useful.rb'
require 'socket'
fire_up_file_modification_checker_thread() if Socket.gethostname =~
(Continue reading)

Shngn | 16 May 01:10
Picon
Gravatar

ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models


Acts_as_soft_deletable is a rails plugin that provides the ability to
soft delete or disable models.

When models are destroyed, they will be archived so that they can
later be restored easily. Its similar to acts_as_paranoid but uses a
different approach that should make it a little more foolproof.

See the README at the following url for a better description.

github url: http://github.com/ajh/acts_as_soft_deletable/tree/master

Feedback is always appreciated.

Thanks,

Andy Hartford
Substantial
hartforda@...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

phil | 16 May 00:19
Favicon

mysql errors in production after upgrading to rails 2


I'm trying to upgrade our production server to rails 2. I've already
done this on my dev machine (osx) and it worked fine. But now, with
everything at the same version, but running in production mode, the
production machine - a CentOS5 box - is getting loads of:
ActiveRecord::StatementInvalid (Mysql::Error: Lost connection to MySQL
server during query
errors.

i"ve looked around but not found any valid reason why this should be
happening. the mysql is version 5.0.22. Ruby 1.8.6 rails 2.0.2.

Without solving this I guess we are going back to Rails 1.2.6, but the
real problem is that it is causing my boss and team to question the
entire stability of Rails!

I've just set the server to run in development mode and it works a
treat!!! What is up with that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Brian Hartin | 16 May 00:19

How to monkeypatch in a plugin


Hi all,

I'm working on a plugin that enables automatic profiling and
benchmarking for unit tests.  I need to monkeypatch
Test::Unit::TestSuite to redefine the run method.  Based on the example
I see at http://svn.jthopple.com/plugins/count_limit_associations, I
thought I should be able to simply open the class in question in
/lib/profile_tests.rb, e.g.

module Test
  module Unit
    class Suite
      def run
        puts "My Run Method Used"
        ...

In init.rb, I simply have

require 'profile_tests'

However, running my tests does not seem to use my definition of 'run'.
Am I missing something?

Thanks!

Brian
--

-- 
Posted via http://www.ruby-forum.com/.

(Continue reading)

Becca Girl | 16 May 00:15

help needed with where and how best to set a param


Once again, I'm writing about a pop-up window issue and need some help.
Trying to insert a new record prior to the pop-up and other sorts of
things has proven to be a much bigger problem so instead I'll have a
default record that will serve as a placeholder for new pop-up window
values.

In my main form, if I'm editing an order, the order id is sent to the
pop-up window.  Then my pop-up window uses that information.  If it's a
new order, the pop-up window doesn't have an order id.

To work around this, I'd like to set a default order ID that I'll use
for new orders so that the pop-up window options work.

My link to the pop-up looks like this:

<%= link_to 'small window',{ :controller => 'codes', :action =>
'pop_up',
:id => @order},  :popup => ['codes',
'width=450,height=600,menubar=no,resizable=yes,scrollbars=yes'] %>

How can I override :id => @order so that I send in a default ID of 1?

If anyone has other, better design ideas, I'd love to hear them.  I
think I've exhausted all of the ones that I have seen.
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
(Continue reading)

Glen | 15 May 23:49
Picon

mongrel_service error


I have an odd situation.  When running my app in production mode via
mongrel_service several things do not work at all.  However when
running in production mode with mongrel from the command line
everything works as expected.  Has anyone seen behavior like this
before?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

smitty26 | 15 May 22:33
Picon

Starting mongrel rails server error...


I have a new rails installation on a Mac and am running into problems
when trying to start my mongrel server (mongrel_rails start).  The
application I'm working on was created from an older version of rails
(windows); could that be the problem?  If so, how can I resolve this?
Any help is appreciated...

** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract/connection_specification.rb:
14: undefined method `cattr_accessor' for ActiveRecord::Base:Class
(NoMethodError)
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
	from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract_adapter.rb:10
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
	from /Users/marksmith/src/apps/sasg3/trunk/config/db2odbc_adapter.rb:
82
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
	 ... 12 levels...
(Continue reading)

david.esmale | 15 May 22:03
Picon

New Fonts & PDF Writer


I've got PDF Writer installed and working.  But for the PDF files that
I want to generate, I need to use a non-standard font (Trade Gothic).
I have the font installed on the system, but my RoR app never seems to
find the font.

Can anyone give me any suggestions on how to resolve this?  Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Gmane