[Rails] How to run a background task in rails

2009-01-07 Thread Zhao Yi

I need to run a background task which should last several hours. How can
I do this in rails?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Versionning system

2009-01-07 Thread Bosko Ivanisevic

After years of using various version controls like CVS and SVN, I
finally ended with Git.

On Jan 7, 9:36 pm, pepe  wrote:
> Hi all.
>
> I want to apologize, I guess this is not the best place to post this
> but I'm interested to know what RoR developers think.
>
> What would be a good open source versionning system for somebody that
> has never used one?
>
> Thanks a lot.
>
> Pepe
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: fckeditor show problem

2009-01-07 Thread Johny ben

finally I solve it
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Populating and maintaining an instance array of arrays of hashes over multiple Ajax calls

2009-01-07 Thread Ram

Hi,
I have a Currency model with id, name and exchange_rate attributes.
I have multiple select boxes for currencies in a form. These can be
added dynamically through JS too.
Im using an observe_field to make an Ajax call to the action
"currency_name" and retrieve the selected currency from the database
using the id.

Following this Ajax call, currency_name.rjs is rendered where i update
the "selected_currencies" div with the currency name and amount(which
is the exchange_rate * some_value). In case a previously chosen
currency is chosen again, only the amount should get updated. But if a
new currency is chosen, "selected_currencies" should get appended with
the new currency's name and amount.

To accomplish this condition checking, I thought of having an instance
@selected_taxes which is an array of arrays (like
[["currency1_id","currency1_name","currency1_rate"],
["currency2_id","currency2_name","currency2_rate"] , ...] ) OR an
array of arrays of hashes (which carry the appropriate keys for the
values). But this array seems to refresh on every Ajax call. I've
paste the controller code below

def currency_name
@chosen_currencies ||= []
flag = 0
@currency = Currency.find(params[:currency_id])
@chosen_currencies.each do |id|
  if (@currency.id == id)
flag = 1
  end
end
@chosen_currencies << @currency.id unless (flag == 1)
raise @chosen_currencies.to_yaml
end

This results in the instance having only one ID at a time.
Firstly, is my approach correct? Or is there a better way?
And secondly, if my approach is correct, how can i maintain this
instance over multiple Ajax calls?
Hope someone can help me out with this.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] polymprphic == confusion

2009-01-07 Thread scott

I have been having trouble setting up some relations.

I want to be able to do this:

user.contact_items# an array of addresses, websites, phone
numbers, etc.
user.addresses # an array of addresses
user.websites   # an array of websites
user.phone_numbers # an array of phone numbers
etc.

and the same for businesses, charities, etc.

Since users, businesses, and charities all can have multiple contact
items I assume a polymorphic relation makes sense.

I also want to be able to do
address.owner   # a user, business, or charity
website.owner   # a user, business, or charity
phone_number.owner # a user, business, or charity
etc.

After much searching, reading and experimenting, my head is beginning
to hurt. Can someone get me pointed in the right direction? How do I
setup my models? Will it be possible to add fields to my join table so
I can flag contact items with things like verified, public, labels,
etc?

OWNERS
---
class Users
  has_many ???
  belongs_to ???

class Businesses
  has_many ???
  belongs_to ???

class Charities
  has_many ???
  belongs_to ???


JOIN TABLE
---
class ContactItems
  has_many ???
  belongs_to ???
  #public:boolean
  #verified:boolean
  #label:string

CONTACT ITEMS
---
class Addresses
  has_many ???
  belongs_to ???

class EmailAddresses
  has_many ???
  belongs_to ???

class PhoneNumbers
  has_many ???
  belongs_to ???

class Websites
  has_many ???
  belongs_to ???

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Stop updated_at from auto updating?

2009-01-07 Thread NAYAK
Hi chirantan,

You can do the set the same variable(record_timestamps) to false in
before_update and reset it appropriately in after_update based on some
condition whatever you want to check.

Regards,
NAYAK

On Thu, Jan 8, 2009 at 9:12 AM, Chirantan Rajhans <
rails-mailing-l...@andreas-s.net> wrote:

>
> Dave Verwer wrote:
> > Jean-François wrote:
> >> If you want to set only for a given model :
> >>
> >> class Foo < ActiveRecord::Base
> >>   self.record_timestamps = false
> >> end
> >
> > Perfect! I can turn that off and then back on around my field update.
> >
> > Thankyou
>
> I have a requirement where I want to disable automatic update of
> updated_at field _only_ when certain attribute is changed. This is
> because I am I am maintaining a view_count field in the database which
> increments everytime the user visits a page. The count needs to be
> tracked but when I update view_count field, rails updates the updated_at
> field too. I want to stop that just for the field view_count. Any
> solution?
>
>
> Chirantan
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR, Apache2, fcgid and ubuntu...

2009-01-07 Thread Bobnation

Didn't really do much, but I'm glad you got it up and running.

Now THAT'S a good feeling. ;)

On Jan 7, 11:36 pm, ZebaMomin  wrote:
> Hey...
> Thanks a lot for your help
> The problem was that I didn't enable the site by doing..
> a2ensite crsa
>
> So I was getting a 404 error
> Now I have the site up and running..:-)
>
> Anyways...Thanks a lot for your help..
>
>
>
> Bobnation wrote:
>
> > I would actually look at Passenger again and see where things went
> > wrong. You can use Passenger along with just the MRI version of Ruby
> > (I'm running it on Ruby 1.8.7 right now).
>
> > Check out some of the Slicehost articles if you want some step-by-step
> > articles to follow:
> >http://articles.slicehost.com/2008/5/1/ubuntu-hardy-mod_rails-install...
>
> > On Jan 7, 12:05 am, ZebaMomin  wrote:
> >> I'm using the module fcgid with apache and so along with it I need the
> >> fcgi
> >> gem.
> >> I tried using fastcgi module but it would crashso I switched to fcgid
> >> which is much reliable than fastcgi...
> >> I've also installed and used phusion passenger and ruby enterprise
> >> edition...but no use
> >> It too gives me a 404 error:-((
>
> >> Can you please suggest any other way in which I can SUCCESSFULLY deploy
> >> my
> >> rails application on apache?
> >> Thanks.
>
> >> Bobnation wrote:
>
> >> > I guess my question would start with this: why are you using fcgi?
>
> >> > On Jan 6, 2:57 am, ZebaMomin  wrote:
> >> >> Hi.
> >> >> I'm trying to deploy my rails application on ubuntu server using
> >> apache2
> >> >> and fcgid..but have not been successful..
> >> >> I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem...
> >> >> I am able to start apache successfully and view the Aptana RadRails
> >> >> welcome page..But giving my controller's name gives me a 404 error...
> >> >> I have made required changes in my /public/.htaccess and
> >> >> /public/dispatch.fcgi filesas=>
>
> >> >> .htaccess(w/o comments)
>
> >> >> AddHandler fastcgi-script .fcgi
> >> >> AddHandler fcgid-script .fcgi
> >> >> AddHandler cgi-script .cgi
> >> >> Options +FollowSymLinks +ExecCGI
> >> >> dispatch.*fcgi*
> >> >> RewriteEngine On
> >> >> RewriteRule ^$ index.html [QSA]
> >> >> RewriteRule ^([^.]+)$ $1.html [QSA]
> >> >> RewriteCond %{REQUEST_FILENAME} !-f
> >> >> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>
> >> >> ErrorDocument 500 "Application errorRails application failed
> >> to
> >> >> start properly"
>
> >> >> dispatch.fcgi
>
> >> >> #!/usr/bin/ruby
> >> >> require File.dirname(__FILE__) + "/../config/environment"
> >> >> require 'fcgi_handler'
> >> >> require 'rubygems'
> >> >> require_gem 'fcgi'
> >> >> RailsFCGIHandler.process!
>
> >> >> I am attaching my httpd.conf file...
>
> >> >> I have checked that my VirtualHost works perfectly...but it doesn't
> >> seem
> >> >> to start my rails application
>
> >> >> Can someone please tell me where am I going wrong
> >> >> Thanks in advance..
>
> >> >> --
> >> >> View this message in
>
> >> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> >> >> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
>
> >> --
> >> View this message in
> >> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> >> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
>
> --
> View this message in 
> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: 126: The specified module could not be found. - c:/ruby/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2006.04.06-x86-msw in32/postgres.so

2009-01-07 Thread Harold

Is the postgres bin directory in your PATH?
Usually: C:\Program Files\PostgreSQL\8.3\bin

On Jan 7, 4:07 pm, Ruby Newbie  wrote:
> I have install postgres but I am getting this message when I am
> starting the application. Please help
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR, Apache2, fcgid and ubuntu...

2009-01-07 Thread ZebaMomin


Hey...
Thanks a lot for your help
The problem was that I didn't enable the site by doing..
a2ensite crsa

So I was getting a 404 error
Now I have the site up and running..:-)

Anyways...Thanks a lot for your help..


Bobnation wrote:
> 
> 
> I would actually look at Passenger again and see where things went
> wrong. You can use Passenger along with just the MRI version of Ruby
> (I'm running it on Ruby 1.8.7 right now).
> 
> Check out some of the Slicehost articles if you want some step-by-step
> articles to follow:
> http://articles.slicehost.com/2008/5/1/ubuntu-hardy-mod_rails-installation
> 
> On Jan 7, 12:05 am, ZebaMomin  wrote:
>> I'm using the module fcgid with apache and so along with it I need the
>> fcgi
>> gem.
>> I tried using fastcgi module but it would crashso I switched to fcgid
>> which is much reliable than fastcgi...
>> I've also installed and used phusion passenger and ruby enterprise
>> edition...but no use
>> It too gives me a 404 error:-((
>>
>> Can you please suggest any other way in which I can SUCCESSFULLY deploy
>> my
>> rails application on apache?
>> Thanks.
>>
>>
>>
>> Bobnation wrote:
>>
>> > I guess my question would start with this: why are you using fcgi?
>>
>> > On Jan 6, 2:57 am, ZebaMomin  wrote:
>> >> Hi.
>> >> I'm trying to deploy my rails application on ubuntu server using
>> apache2
>> >> and fcgid..but have not been successful..
>> >> I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem...
>> >> I am able to start apache successfully and view the Aptana RadRails
>> >> welcome page..But giving my controller's name gives me a 404 error...
>> >> I have made required changes in my /public/.htaccess and
>> >> /public/dispatch.fcgi filesas=>
>>
>> >> .htaccess(w/o comments)
>>
>> >> AddHandler fastcgi-script .fcgi
>> >> AddHandler fcgid-script .fcgi
>> >> AddHandler cgi-script .cgi
>> >> Options +FollowSymLinks +ExecCGI
>> >> dispatch.*fcgi*
>> >> RewriteEngine On
>> >> RewriteRule ^$ index.html [QSA]
>> >> RewriteRule ^([^.]+)$ $1.html [QSA]
>> >> RewriteCond %{REQUEST_FILENAME} !-f
>> >> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>>
>> >> ErrorDocument 500 "Application errorRails application failed
>> to
>> >> start properly"
>>
>> >> dispatch.fcgi
>>
>> >> #!/usr/bin/ruby
>> >> require File.dirname(__FILE__) + "/../config/environment"
>> >> require 'fcgi_handler'
>> >> require 'rubygems'
>> >> require_gem 'fcgi'
>> >> RailsFCGIHandler.process!
>>
>> >> I am attaching my httpd.conf file...
>>
>> >> I have checked that my VirtualHost works perfectly...but it doesn't
>> seem
>> >> to start my rails application
>>
>> >> Can someone please tell me where am I going wrong
>> >> Thanks in advance..
>>
>> >> --
>> >> View this message in
>> >>
>> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
>> >> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
>>
>> --
>> View this message in
>> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
>> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp21305625p21346165.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Authenticating users on different sources

2009-01-07 Thread José Tiburcio Ribeiro Netto
Hi there folks!

I need to authenticate users on different sources (for instance, local
database and Active Directory), and make registration (on local db) possible
for users who don't have an AD account..

For the db authentication, I have chosen restful_authentication. This way,
new users who are not part of the organization are able to register and use
the application.

But for the AD auth, I don't know how to implement it yet.

I thought about creating some additional methods on sessions controller to
take care of this AD authentication process if the user selects the option
of using it's existing AD account on the login page.

Have anyone experimented this scenario?

If so, what tips do you have for me?

Thanks in advance!

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails 2.2 on Mac OSX 10.5

2009-01-07 Thread Ryan Bigg

You've named a model after something that's a reserved module in  
Rails. Call it something else.

-
Ryan Bigg
Freelancer
http://frozenplague.net







On 08/01/2009, at 3:30 PM, Adam wrote:

>
> I need some help figuring out what is wrong with my 2.2 installation
> of rails on Mac OSX 10.5.
>
> I performed the following commands prior to creating a sample app.
>
> sudo gem update --system
> sudo gem update rails
> sudo gem update mongrel
> sudo gem update sqlite3
>
> All these commands worked successfully without error.  Then I created
> a sample app called depot and created a quick scaffold of test with a
> name & birthday fields.
>
> Now when trying to access http://localhost:3000/tests/  I get the
> following dump.  It does not make much sense to me.  Kinda new at this
> stuff still.  Any help will be greatly appreciated.
>
> Last login: Wed Jan  7 21:37:19 on ttys000
> Macintosh:~ adam$ ruby -v
> ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
> Macintosh:~ adam$ rails -v
> Rails 2.2.2
> Macintosh:~ adam$ gem -v
> 1.3.1
> Macintosh:~ adam$ script/server
> -bash: script/server: No such file or directory
> Macintosh:~ adam$ cd sites
> Macintosh:sites adam$ cd depot
> Macintosh:depot adam$ script/server
> => Booting Mongrel (use 'script/server webrick' to force WEBrick)
> => Rails 2.2.2 application starting on http://0.0.0.0:3000
> => Call with -d to detach
> => Ctrl-C to shutdown server
> ** Starting Mongrel listening at 0.0.0.0:3000
> ** Starting Rails with development environment...
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
> ** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no
> restart).
> ** Rails signals registered.  HUP => reload (without restart).  It
> might not work well.
> ** Mongrel 1.1.5 available at 0.0.0.0:3000
> ** Use CTRL-C to stop.
>
>
> Processing TestsController#index (for 127.0.0.1 at 2009-01-07
> 22:53:27) [GET]
>
>
> NoMethodError (undefined method `find' for Test:Module):
>/app/controllers/tests_controller.rb:5:in `index'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> base.rb:1253:in `send'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> base.rb:1253:in `perform_action_without_filters'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> filters.rb:617:in `call_filters'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> filters.rb:610:in `perform_action_without_benchmark'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> benchmarking.rb:68:in `perform_action_without_rescue'
>/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> ruby/1.8/benchmark.rb:293:in `measure'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> benchmarking.rb:68:in `perform_action_without_rescue'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> rescue.rb:136:in `perform_action_without_caching'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> caching/sql_cache.rb:13:in `perform_action'
>/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> connection_adapters/abstract/query_cache.rb:34:in `cache'
>/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> query_cache.rb:8:in `cache'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> caching/sql_cache.rb:12:in `perform_action'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> base.rb:524:in `send'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> base.rb:524:in `process_without_filters'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> filters.rb:606:in `process_without_session_management_support'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> session_management.rb:134:in `process'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> base.rb:392:in `process'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:183:in `handle_request'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:110:in `dispatch_unlocked'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:123:in `dispatch'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:122:in `synchronize'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:122:in `dispatch'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:132:in `dispatch_cgi'
>/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:39:in `dispatch'
>/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
> rails.rb:76:in `process'
>/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
> rails.rb:74:in `synchronize'
>/Lib

[Rails] Re: Rails Hosting

2009-01-07 Thread Matt Harrison

alexey.Creopolis wrote:
> I tried dreamhost and its pretty good for running dev applications on
> shared (passenger mod_rails !)

+1 for dreamhost. They're not fast for rails aps, but definitely good 
enough for testing deployment and sandbox.

Plus for $10/month for pretty much unlimited resources, it can't hurt.

Matt

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Rails 2.2 on Mac OSX 10.5

2009-01-07 Thread Adam

I need some help figuring out what is wrong with my 2.2 installation
of rails on Mac OSX 10.5.

I performed the following commands prior to creating a sample app.

sudo gem update --system
sudo gem update rails
sudo gem update mongrel
sudo gem update sqlite3

All these commands worked successfully without error.  Then I created
a sample app called depot and created a quick scaffold of test with a
name & birthday fields.

Now when trying to access http://localhost:3000/tests/  I get the
following dump.  It does not make much sense to me.  Kinda new at this
stuff still.  Any help will be greatly appreciated.

Last login: Wed Jan  7 21:37:19 on ttys000
Macintosh:~ adam$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Macintosh:~ adam$ rails -v
Rails 2.2.2
Macintosh:~ adam$ gem -v
1.3.1
Macintosh:~ adam$ script/server
-bash: script/server: No such file or directory
Macintosh:~ adam$ cd sites
Macintosh:sites adam$ cd depot
Macintosh:depot adam$ script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  TERM => stop.  USR2 => restart.  INT => stop (no
restart).
** Rails signals registered.  HUP => reload (without restart).  It
might not work well.
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.


Processing TestsController#index (for 127.0.0.1 at 2009-01-07
22:53:27) [GET]


NoMethodError (undefined method `find' for Test:Module):
/app/controllers/tests_controller.rb:5:in `index'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:1253:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:1253:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/benchmark.rb:293:in `measure'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
rescue.rb:136:in `perform_action_without_caching'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
caching/sql_cache.rb:13:in `perform_action'
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
query_cache.rb:8:in `cache'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
caching/sql_cache.rb:12:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:524:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:524:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
filters.rb:606:in `process_without_session_management_support'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
session_management.rb:134:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:392:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:183:in `handle_request'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:110:in `dispatch_unlocked'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:123:in `dispatch'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:122:in `synchronize'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:122:in `dispatch'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:132:in `dispatch_cgi'
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
dispatcher.rb:39:in `dispatch'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:76:in `process'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `synchronize'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
rails.rb:74:in `process'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`each'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client'
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.

[Rails] Re: Total Date Difference

2009-01-07 Thread Ferdie Ferdie


Thanks for the helps ! it's work perfectly.

Thanks Again for all the replay.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Stop updated_at from auto updating?

2009-01-07 Thread Chirantan Rajhans

Dave Verwer wrote:
> Jean-François wrote:
>> If you want to set only for a given model :
>> 
>> class Foo < ActiveRecord::Base
>>   self.record_timestamps = false
>> end
> 
> Perfect! I can turn that off and then back on around my field update.
> 
> Thankyou

I have a requirement where I want to disable automatic update of 
updated_at field _only_ when certain attribute is changed. This is 
because I am I am maintaining a view_count field in the database which 
increments everytime the user visits a page. The count needs to be 
tracked but when I update view_count field, rails updates the updated_at 
field too. I want to stop that just for the field view_count. Any 
solution?


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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread Zhao Yi

Ryan Bigg wrote:
> no, you don't have to write the \n.
> 
> When people type new lines it automatically puts in the \n, or in some
> cases a \r\n.
> 
> This means simple_format will work.
> -
> Ryan Bigg
> Freelancer
> http://frozenplague.net

thanks it works.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread Ryan Bigg

no, you don't have to write the \n.

When people type new lines it automatically puts in the \n, or in some  
cases a \r\n.

This means simple_format will work.
-
Ryan Bigg
Freelancer
http://frozenplague.net







On 08/01/2009, at 1:18 PM, Zhao Yi wrote:

>
> Ryan Bigg wrote:
>> simple_format(your_text_here)
>> -
>> Ryan Bigg
>> Freelancer
>> http://frozenplague.net
>
> In this way, I have to write \n in the textarea which is not a good  
> user
> interface. How can I do some background job to replace the textarea
> before it is submitted?
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread Zhao Yi

Ryan Bigg wrote:
> simple_format(your_text_here)
> -
> Ryan Bigg
> Freelancer
> http://frozenplague.net

In this way, I have to write \n in the textarea which is not a good user 
interface. How can I do some background job to replace the textarea 
before it is submitted?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread Ryan Bigg

simple_format(your_text_here)
-
Ryan Bigg
Freelancer
http://frozenplague.net







On 08/01/2009, at 1:00 PM, Zhao Yi wrote:

>
> srj wrote:
>> You should not try that because the text area is designed to wrap  
>> text
>> automatically - there really are not new line characters in the text
>> area, unless you manually inserted them.  In that case, they should
>> remain.
>
> I have input "\n" at each line of the text, but it doesn't work.
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread Zhao Yi

srj wrote:
> You should not try that because the text area is designed to wrap text
> automatically - there really are not new line characters in the text
> area, unless you manually inserted them.  In that case, they should
> remain.

I have input "\n" at each line of the text, but it doesn't work.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] How to download a dynamically generated file

2009-01-07 Thread Raj

I need to provide users a link to download an  user_guide.txt file.

Currently the user_guide.html.erb looks like this.

Dear <%...@user.name %>,

Please visit <%...@unlocking_webiste %> site.

...
...

the point is that the file has some variables which needs to be
replaced then user should be able to download these files and use
them.

I can find ways to download a static file but in this case how should
I code such that users are able to download the customized files.

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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: A problem of ignoring newline in textarea

2009-01-07 Thread srj

You should not try that because the text area is designed to wrap text
automatically - there really are not new line characters in the text
area, unless you manually inserted them.  In that case, they should
remain.

On Jan 7, 9:21 pm, Zhao Yi  wrote:
> I use text_area_tag in a view page and when its action get its value by
> params[:id], all the newline will be removed. How can I keep the format
> of textarea?
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] A problem of ignoring newline in textarea

2009-01-07 Thread Zhao Yi

I use text_area_tag in a view page and when its action get its value by
params[:id], all the newline will be removed. How can I keep the format
of textarea?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Serialized data

2009-01-07 Thread Glen

Did you use ActiveRecord's serialization?

class MyModel < ActiveRecord::Base
  serialize :data, Hash
end

If so, you can simple call from your model to get your hash back.

mymodel = MyModel.find(prams[:id])
myhash = mymodel.data
field1 = myhash[:field1]



Thank you,
Glen


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Passing information to the controller from view

2009-01-07 Thread Brian Hogan

In your controller, you just need

   data = render_to_string({:action => 'create.html.erb', :layout=>false})

I'm doing a PDF (using HTMLDOC) that way. Works awesome.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Passing information to the controller from view

2009-01-07 Thread Rob Biedenharn


On Jan 7, 2009, at 6:45 PM, Ryan Mckenzie wrote:

>
> Frederick Cheung wrote:
>> On 7 Jan 2009, at 17:33, Ryan Mckenzie wrote:
>>
>>>
>> render_to_string ?
>>
>> Fred
>
> render_to_string puts the whole html document in the data including  
> the
> template, however I only need part of the file. This code might  
> explain
> it a little better.
>
> #demo_controller.rb
>   1. def createFile
>   2. render_to_string :layout => false
render here...
>
>   3. @demo = Demo.find(params[:id])
>   4.
>   5. data = render_to_string
...and here???  (without giving :layout => false)
>
>   6.
>   7. f = File.open("#{RAILS_ROOT}/public/demo/demotest.txt", "wb")
>   8. f.write(data)
>   9. f.close
>  10.
>  11.   end
>
> #demo/createFile.html.erb
>   1. ModelTemp {
>   2. Name "Mod"
>   3.   Halt 0.0
>   4.   DType "Define"
>   5.   FData {
>   6. Events {
>   7. <% for event in display_demo_events(@demo) %>
>   8.   Event {
>   9. Name "<%= event.name -%>"
>  10. Desc "<%= event.description -%>"
>  11. Constant {FRate="<%= event.f_rate -%>"}
>  12.   }
>  13.   <% end %>
>  14. }
>  15. Outputs {
>  16.   <% for deviation in display_demo_events(@demo) %>
>  17.   Deviation {
>  18. Name "<%= deviation.output_class -%>"
>  19. "<%= deviation.description -%>"
>  20.   }
>  21.   <% end %>
>  22. }
>  23.   }
>  24. }
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Passing information to the controller from view

2009-01-07 Thread Ryan Mckenzie

Frederick Cheung wrote:
> On 7 Jan 2009, at 17:33, Ryan Mckenzie wrote:
> 
>>
> render_to_string ?
> 
> Fred

render_to_string puts the whole html document in the data including the 
template, however I only need part of the file. This code might explain 
it a little better.

#demo_controller.rb
   1. def createFile
   2. render_to_string :layout => false
   3. @demo = Demo.find(params[:id])
   4.
   5. data = render_to_string
   6.
   7. f = File.open("#{RAILS_ROOT}/public/demo/demotest.txt", "wb")
   8. f.write(data)
   9. f.close
  10.
  11.   end

#demo/createFile.html.erb
   1. ModelTemp {
   2. Name "Mod"
   3.   Halt 0.0
   4.   DType "Define"
   5.   FData {
   6. Events {
   7. <% for event in display_demo_events(@demo) %>
   8.   Event {
   9. Name "<%= event.name -%>"
  10. Desc "<%= event.description -%>"
  11. Constant {FRate="<%= event.f_rate -%>"}
  12.   }
  13.   <% end %>
  14. }
  15. Outputs {
  16.   <% for deviation in display_demo_events(@demo) %>
  17.   Deviation {
  18. Name "<%= deviation.output_class -%>"
  19. "<%= deviation.description -%>"
  20.   }
  21.   <% end %>
  22. }
  23.   }
  24. }

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Serialized data

2009-01-07 Thread mafloria

Hi,

I have a serialized Hash in a database. How can I acces my data? data
is stored as a varchar and text.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: controller if statement error with param

2009-01-07 Thread Fididle Fididle

Vishwanath Nayak wrote:
> Hi,
> 
> are you sure its a string? just check with @state.class, and also try to
> print the value before the if (so as to confirm its not getting modified
> later on)
> 
> -NAYAK
> 
> On Wed, Jan 7, 2009 at 11:38 PM, Fididle Fididle <

Thanks Nayak. I was trying to compare an array with a simple string.
Changing the test (below) works.

--
controller
-
...
def search
...
  @state  = params[:state]
  @debug = 0
if @state[0]  == "ALL"
@debug = 1
end
...
end
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Hosting

2009-01-07 Thread Robby Russell

On Wed, Jan 7, 2009 at 2:48 PM, pete  wrote:
>
> Seems like the more I dig, the more things there are to consider :)
>
> With Slicehost, or any VPS for that matter, it seems like you get a
> machine to configure how you would like to, right?  Almost like a
> dedicated host, except, it's not (if that makes sense).  So if I go
> with a VPS, then I am free to use, Git, Passenger, or anything I want
> to...I just have to install it all myself?
>
> Thanks again for all the feedback.

Pete,

You can also look at services (such as ours) that provides you with a
fully configured and ready-to-go deployment environment.

* http://railsboxcar.com/

We make a bunch of the decisions for you so that you can focus on
coding and deploying updated versions of your applications.

Good luck!
Robby

-- 
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread Frederick Cheung



On 7 Jan 2009, at 22:06, jabauer  wrote:

>
>> have you tried sudo gem install mysql -- --with-mysql-config=/usr/
>> local/mysql/bin/mysql_config
>> ?
>>
>> Fred
>
> Just tried that and it seemed to work until I restarted the server and
> got this error
>
> dlsym(0x2727d10, Init_mysql): symbol not found - /usr/local/lib/ruby/
> gems/1.8/gems/mysql-2.7/lib/mysql.bundle
>
> I don't know why it's looking for mysql in /usr/local/lib/ruby when I
> put it in /usr/local/mysql
>
It's not. It's saying that it couldn't find a function called  
Init_mysql inside the gem. Have you checked whether that mysql.bundle  
file is of the correct architecture? (which should match both your  
machine and the mysql client libraries you have)
> Sorry to be so much trouble!
>
> --Jean--
>
>
> >

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Hosting

2009-01-07 Thread pete

Seems like the more I dig, the more things there are to consider :)

With Slicehost, or any VPS for that matter, it seems like you get a
machine to configure how you would like to, right?  Almost like a
dedicated host, except, it's not (if that makes sense).  So if I go
with a VPS, then I am free to use, Git, Passenger, or anything I want
to...I just have to install it all myself?

Thanks again for all the feedback.

On Jan 7, 11:53 am, Sazima  wrote:
> Pete,
>
> Since you have multiple apps, you should look for a provider that
> offers Passenger. I had a similar setup whith 3 apps, each run by 4
> mongrels. Result: out of memory! With Passenger you don't waste
> resources on apps without traffic at any given moment.
>
> Cheers, Sazima
>
> On Jan 6, 5:35 pm, pete  wrote:
>
> > Hi-
>
> > I've done some searching, but since there are many options, I'd like
> > to get some feedback from the group at large.
>
> > I have a couple of Rails apps that will likely not see too much
> > traffic and I would like to find a public home for them.  Since these
> > sites are not generating any revenue for me, I'd like to find a less
> > expensive home.
>
> > Anyone have a suggestion, or know of a good resource, for a good, less-
> > expensive hosting service to get up and running?
>
> > 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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] 126: The specified module could not be found. - c:/ruby/lib/ruby/gems/1.8/gems/ruby-postgres-0.7.1.2006.04.06-x86-msw in32/postgres.so

2009-01-07 Thread Ruby Newbie

I have install postgres but I am getting this message when I am
starting the application. Please help

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: 126: The specified module could not be found - ../mysql.

2009-01-07 Thread Ruby Newbie

Matthew,

I am also getting the same error and looks like the solution that you
gave worked. How can I add the path

Please help

Thanks,
Ahmed

On Nov 28 2008, 2:30 pm, Matthew Phillips  wrote:
> Matthew Phillips wrote:
> > there's something seriously screwed up with the new mysql gem,
> > especially for Vista users.  You are not alone in having these problems
> > and I personally have not yet found a solution.
>
> But just to point you in the right direction, make sure your mysql bin
> directory is in your path.  Type PATH in the command prompt to see if it
> is.  If not, add it.  From there try again.
> --
> Posted viahttp://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Ongoing errors with libxml & mysql

2009-01-07 Thread MikeyB

It seems like whenever I get around one issue another one surfaces...
now when I try to do anything with my app (rake db:migrate, script/
server), I get the following error:

/opt/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.9.7/lib/
libxml_ruby.bundle: [BUG] Bus Error
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9]

Abort trap


---

Anyone have any idea what I can do to resolve this? Thanks in advance
for any help.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Slightly Off Topic: Rails/SVN/Capistrano...plus Git?

2009-01-07 Thread Norm

I found "Version Control with Subversion" by Ben Collins-Sussman,  Brian 
W. Fitzpatrick and  C. Michael Pilato very good at answering that kind 
of question.  I do not remember where I downloaded it from but you 
should be able to find it without too much trouble.

Norm


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Slightly Off Topic: Rails/SVN/Capistrano...plus Git?

2009-01-07 Thread Norm
Jeff Pritchard wrote:
> Hi,
> I've been using SVN and Capistrano with rails for a long time now.  I'm
> pretty happy with the setup, and svn works well with capistrano without
> the additional calisthenics that git's non-centralized server approach
> brings to the table.
>
> I also like having my svn server always up to date and running on the
> linux box 24/7 so I can get at my stuff from anywhere and make changes
> etc.
>
> The one area I have found it lacking, and admittedly it is probably
> because I'm a very novice user of svn is when it comes to making
> branches or some other means of selectively deploying some of what I'm
> working on without deploying everything.  For instance if I have some
> stuff deployed to the staging server and the Boss has finally tried it
> out and said to send it up to the live server...but meanwhile I've
> started something else, some of which is checked inyou know the
> drill.
>
> It seems one of the things git users like the most about it is that it
> is very easy to make branches for things and merge them back in as
> needed.  I'm wondering if anyone has started using svn and git together
> such that things on the local machine get "gitted" on a regular basis,
> each on their own branches, and then whenever you need to deploy
> something to one server or the other, you "git your stuff together" and
> then commit that to svn and cap it to the server.
>
> In other words, git locally, and svn for global and deployment file
> management?  Does this work, or do they fight with each other?
>
> thanks,
> jp
>   
Just make a branch of what you have submitted to the boss.  You will 
then use that for production when he blesses it.  In the mean time you 
can continue development on the trunk without changing what is on the 
branch.  If you have to correct errors on the branch you can merge the 
branch in with the trunk or just maintain them seperatly depending on 
what your configuration management plan (You have one of those don't 
you/) calls for.

Norm

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Error message

2009-01-07 Thread Rob Biedenharn


On Jan 7, 2009, at 4:53 PM, Shandy Nantz wrote:

>
> I have this app where people can build a profile full of various kinds
> of data. The first page that they see when they create their profile  
> is
> a page named 'new'. If you add an id number for the company you work  
> for
> - one that is already know by the user - it automaticaly fills in your
> company address information for you. Everything works fine, but I just
> happen to be looking at my logs and I see that everytime the 'new'  
> page
> is visited it is throwing some kind of error:
>
> ActionController::RoutingError (No route matches
> "/javascripts/defaults.js" with {:method=>:get}):
> Rendering
> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ 
> action_controller/templates/rescues/layout.erb
> (not_found)
>
> Everything seems to be working fine, the profile get created and the
> company address gets saved but I would like to make it so that this
> error is not thrown. I imagine that this is a routing issue, but I
> honestly am not certain of that. Anyone have any ideas about what is
> happening and how to stop it from throwing these errors? Thanks,
>
> -S
> -- 


You probably want to let the static assets like javascript files be  
served directly by the front-end.  For example, in the Apache  
configuration you could put:

   # These directories should always be served up by Apache, since  
they contain static content.  Or just let rails do it.
   ProxyPass /images !
   ProxyPass /stylesheets !
   ProxyPass /javascripts !
   ProxyPass /favicon.ico !

Of course, if the file javascripts/default.js doesn't exist (which  
might be another reason), you just want to find and remove the:
   javascript_include_tag :defaults
from your layout.  If you have 'defaults' instead of :defaults, then  
just change it to a symbol and it will do the right thing.

-Rob

Rob Biedenharn  http://agileconsultingllc.com
r...@agileconsultingllc.com



--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Slightly Off Topic: Rails/SVN/Capistrano...plus Git?

2009-01-07 Thread Jeff Pritchard

Hi,
I've been using SVN and Capistrano with rails for a long time now.  I'm
pretty happy with the setup, and svn works well with capistrano without
the additional calisthenics that git's non-centralized server approach
brings to the table.

I also like having my svn server always up to date and running on the
linux box 24/7 so I can get at my stuff from anywhere and make changes
etc.

The one area I have found it lacking, and admittedly it is probably
because I'm a very novice user of svn is when it comes to making
branches or some other means of selectively deploying some of what I'm
working on without deploying everything.  For instance if I have some
stuff deployed to the staging server and the Boss has finally tried it
out and said to send it up to the live server...but meanwhile I've
started something else, some of which is checked inyou know the
drill.

It seems one of the things git users like the most about it is that it
is very easy to make branches for things and merge them back in as
needed.  I'm wondering if anyone has started using svn and git together
such that things on the local machine get "gitted" on a regular basis,
each on their own branches, and then whenever you need to deploy
something to one server or the other, you "git your stuff together" and
then commit that to svn and cap it to the server.

In other words, git locally, and svn for global and deployment file
management?  Does this work, or do they fight with each other?

thanks,
jp
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread jabauer

> have you tried sudo gem install mysql -- --with-mysql-config=/usr/
> local/mysql/bin/mysql_config
> ?
>
> Fred

Just tried that and it seemed to work until I restarted the server and
got this error

dlsym(0x2727d10, Init_mysql): symbol not found - /usr/local/lib/ruby/
gems/1.8/gems/mysql-2.7/lib/mysql.bundle

I don't know why it's looking for mysql in /usr/local/lib/ruby when I
put it in /usr/local/mysql

Sorry to be so much trouble!

--Jean--


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread jabauer

> have you tried sudo gem install mysql -- --with-mysql-config=/usr/
> local/mysql/bin/mysql_config
> ?
>
> Fred

Just tried that and it seemed to work until I restarted the server and
got this error

dlsym(0x2727d10, Init_mysql): symbol not found - /usr/local/lib/ruby/
gems/1.8/gems/mysql-2.7/lib/mysql.bundle

I don't know why it's looking for mysql in /usr/local/lib/ruby when I
put it in /usr/local/mysql

Sorry to be so much trouble!

--Jean--


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Error message

2009-01-07 Thread Shandy Nantz

I have this app where people can build a profile full of various kinds
of data. The first page that they see when they create their profile is
a page named 'new'. If you add an id number for the company you work for
- one that is already know by the user - it automaticaly fills in your
company address information for you. Everything works fine, but I just
happen to be looking at my logs and I see that everytime the 'new' page
is visited it is throwing some kind of error:

ActionController::RoutingError (No route matches
"/javascripts/defaults.js" with {:method=>:get}):

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/recognition_optimisation.rb:67:in
`recognize_path'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/routing/route_set.rb:384:in
`recognize'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:148:in
`handle_request'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:in
`dispatch'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in
`synchronize'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in
`dispatch'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'

c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:in
`dispatch'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:76:in
`process'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in
`synchronize'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel/rails.rb:74:in
`process'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in
`process_client'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`each'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in
`process_client'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`initialize'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`new'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`initialize'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`new'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`each'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in
`run'

c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
`new_constants_in'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'

c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
`require'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
`new_constants_in'

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
./script/server:3
-e:2:in `load'
-e:2

Rendering
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/templates/rescues/layout.erb
(not_found)

Everything seems to be working fine, the profile get created and the
company address gets saved but I would like to make it so that this
error is not thrown. I imagine that this is a rou

[Rails] Passing data from action of cntrlr 1 to action of cntrlr 2

2009-01-07 Thread Lance Klusener

The question is about passing data from action of one controller to
action of another controller.

Inside the new_patient_controller i have the following code when the
button "next" is clicked



def create_visit (created_patient)
redirect_to(:controller=>"patient_visit",:action=>"index",:created_patient=>created_patient)
   end

This is suppose to call the index view of the "patient_visit" controller
.

Now the "patient_visit" controller has the following form




   1. <% form_for :patient_visit , :url => { :action =>
:save_patient_visit } do |form| %>
   2.
   3. 
   4.   <%= label :patient_visit , :complaints , "Complaints:"  %>
   5.   <%= form.text_area :complaints , :size => 20 %>
   6. 
   7.
   8. 
   9.   <%= label :patient_visit , :systemic_history , "Systemic
History:"  %>
  10.   <%= form.text_field :systemic_history , :size => 40 %>
  11. 
  12.
  13. 
  14.   <%= label :patient_visit , :opthal_history  , "Opthal
History:"  %>
  15.   <%= form.text_field :opthal_history  , :size => 40 %>
  16. 
  17.
  18. <%= submit_tag "next" , :class => "submit"  %>
  19.
  20. <%end%>

Because of this the params which originally had the value of
"created_patient" now gets overwritten with the new params which has the
value of ":patient_visit" .

I need the created_patient value , cause i need to attach the
patient_visit database entry to the created_patient. ( since one patient
has many visits )
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Issue with scaffolding with rail 2.2 and mySQL

2009-01-07 Thread Stephen Morrison

Thanks for the help! Much appreciated!

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Fwd: change javascript default from jquery back to prototype

2009-01-07 Thread Felipe Gallois
the variable was ok, i just overwritten it with itself and restarted the
server and now it is working...

thank you!!

cheers

On Wed, Jan 7, 2009 at 16:33, Dingding Ye  wrote:

> check this variable in console:
>
> >> ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES
>
>
> On Thu, Jan 8, 2009 at 12:46 AM, Felipe Gallois 
> wrote:
>
>> already did it, no luck
>>
>> On Wed, Jan 7, 2009 at 14:44, Freddy Andersen wrote:
>>
>>>
>>> Remove the vendor/plugin/jrails directory and remove the jquery
>>> scripts in public/javascripts/
>>>
>>> That should be all you need todo...
>>>
>>>
>>
>>
>> --
>> gallois
>> aka Felipe Gallois
>> blog: www.gallois.com.br/blog
>> fanglib homepage: www.gallois.com.br/fanglib
>>
>>
>>
>
> >
>


-- 
gallois
aka Felipe Gallois
blog: www.gallois.com.br/blog
fanglib homepage: www.gallois.com.br/fanglib

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: NEED HELP

2009-01-07 Thread Matt Harrison

anton effendi wrote:
> Hai guys.
> I have problem in Rails.. Can u help me? please.
> 
> My problem:
> 
> I want to make code for maintenance database... I want like migration... 
> can change to another version...
> so when I import some data, I must revert to before version..
> 
> example:
> file import 1 --> import to database... version 1
>  user1 add some data
> file import 2 --> import to database... version 2
>  user2 add some data
> file import 3 --> import to database... version 3
> 
> if file import 3 wrong data, then I can change to version2 with some 
> data form user2.(last data base before file import3 exceuted)
> 
> 
> do anybody know about it?? if must use plugin.. what are they??

Have you looked at acts_as_versioned? I'm not totally sure what you're 
trying to do but that might work for you.

HTH

Matt


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Urgent Hire in NYC

2009-01-07 Thread Smiley

Our client is a leading NYC-based publisher of web and mobile games,
and personalization applications.  They are seeking a Senior Server
Engineer with Ruby on Rails experience.  The Senior Server Engineer
works with the company's server engineering team.

The ideal candidate will have a passion for creating reliable and
elegant software quickly, using agile methodologies, and be
comfortable pushing and expanding the Rails framework. You should have
also have strong knowledge of Meta-Programming in Ruby on Rails.

Please let me know if you would like to learn more about this
opportunity or if you know someone who may be qualified.  The client
is offering an attractive salary package with benefits.  I’d
appreciate the opportunity to speak with you in more detail about
their company and the specifics of the role. If you have a referral
please send me there contact info and we do pay a referral fee!

Thanks and take care,
Liz Smiley
Recruiter
GameRecruiter.com, Inc.
866-358-GAME - Ext: 113
www.GameRecruiter.com
http://www.linkedin.com/in/lizsmiley

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails 2.2 routing problem

2009-01-07 Thread cassiozen

You could try to use formatted_items_path(:pdf)

On Jan 7, 6:30 pm, Michael Rigart 
wrote:
> Hi all
>
> I just upgraded a project of mine from rails 2.1 to 2.2. Becouse of this
> upgrade, I have a link that doesn't work anymore. I get an error when
> rendering the page:
>
> outgoing_invoice_url failed to generate from {:action=>"show",
> :override=>true, :controller=>"outgoing_invoices", :id=>"2297.pdf"},
> expected: {:action=>"show", :controller=>"outgoing_invoices"}, diff:
> {:override=>true, :id=>"2297.pdf"}
>
> I have build the link as followed:
>
> <%= "#{outgoing_invoice_path("#{outgoing_invoice.id}.pdf", :override =>
> true)}" %>
>
> It should render the link for the show action but also needs to send a
> parameter with it.
> This worked in Rails 2.1. I know that there are some routing changes in
> rails 2.2, but I can't see what is wrong with mine.
>
> Could anyone help me?
>
> Thanks in advance for the help.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Versionning system

2009-01-07 Thread pepe

Hi all.

I want to apologize, I guess this is not the best place to post this
but I'm interested to know what RoR developers think.

What would be a good open source versionning system for somebody that
has never used one?

Thanks a lot.

Pepe
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Rails 2.2 routing problem

2009-01-07 Thread Michael Rigart

Hi all

I just upgraded a project of mine from rails 2.1 to 2.2. Becouse of this
upgrade, I have a link that doesn't work anymore. I get an error when
rendering the page:

outgoing_invoice_url failed to generate from {:action=>"show",
:override=>true, :controller=>"outgoing_invoices", :id=>"2297.pdf"},
expected: {:action=>"show", :controller=>"outgoing_invoices"}, diff:
{:override=>true, :id=>"2297.pdf"}

I have build the link as followed:

<%= "#{outgoing_invoice_path("#{outgoing_invoice.id}.pdf", :override =>
true)}" %>

It should render the link for the show action but also needs to send a
parameter with it.
This worked in Rails 2.1. I know that there are some routing changes in
rails 2.2, but I can't see what is wrong with mine.

Could anyone help me?

Thanks in advance for the help.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Database.yml password and security

2009-01-07 Thread Robert Walker

pikz wrote:
> I would like to ask if it's less secure to grant all privileges in
> MySQL to the user running the application, instead of having the
> password in the database.yml file?

I don't understand this question. The database.yml file specifies both 
the mysql user and the password for the specified user used to connect 
to the database.

I think what you're getting at is whether to put the literal password in 
the database.yml file or store the password separately in a file, which 
is then stored in a secure location. Then reference that file to get the 
password. This is often done for the :production settings in the 
database.yml file.

If I remember right this Railscasts episode shows how to do this:
http://railscasts.com/episodes/85-yaml-configuration-file
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Multiple Openings for Wireless/Mobile/BlackBerry Project

2009-01-07 Thread Ajay Dubey

Job Site: Ideally they would want everyone to work in their new Irvine,
CA facility.



Job Duration: Contract - 6 months



Project Overview:  Develop a web-based service for sales contact and
campaign management.  Provide access to that service via a BlackBerry
native client and a web-based administration interface, and integrate
with existing Exchange, Active Directory and Data Warehousing services.
For all positions, wireless/mobile/blackberry device experience is
mandatory.



Open Positions: 11 Openings



1 Project Manager (scrummaster)



A (agile) project manager to manage day to day production and
development.



Skills   - Project Management



  - Agile



1 Developer - BlackBerry



Will develop the BlackBerry client for on-site sales reps to access
(create, modify, update and delete) contact information and marketing
campaign data.



Skills   - Java ME (J2ME)



  - BlackBerry: development and administration



1 Artist -- BlackBerry



Will develop icons and art assets for the BlackBerry client.



Skills   - BlackBerry experience



  - Photoshop / Illustrator



Two developers (2) - Core Services



Will develop a core services layer to manage client authentication and
authorization via Active Directory, the flow of data from BlackBerry
clients to the data warehouse, and the service responsible for
integrating with Exchange.



skills   - Ruby on Rails



  - OS X / Linux



  - Active Directory / LDAP



  - MySQL



Pluses: JRuby, Glassfish



1 Developer -- Admin Service (front end)



Will develop an administrative service to manage sales and marketing
campaign data, and sales rep permissions via a web-based interface.



skills   - OS X / Linux



- JavaScript framework(Prototype, Scriptaculous, MooTools, JQuery, dojo,

YUI)



- Ruby on Rails



Pluses: JRuby, Glassfish



1 Developer -- Admin Service (back end)



Will develop an administrative service to manage sales and marketing
campaign data, and sales rep permissions via a web-based interface.



skills   - Ruby on Rails



  - OS X / Linux



  - MySQL



Pluses: JRuby, Glassfish



1 Artist -- Admin Service



Will develop art assets and wireframes for the administrative client.



skills   - HTML/CSS



  - Photoshop / Illustrator



Plus: JavaScript



1 Developer - Exchange Service



Will develop a service to integrate contact and calendar data with an
existing Exchange service.  The service derives data and permissions
dynamically from the core services layer (and administrative interface).



skills   - Ruby (on Rails+)



  - Exchange



  - windows / OS X / Linux



  - Active Directory / LDAP



Pluses: JRuby, Glassfish



1 Developer - ETL Service



Will develop a service to manage data flow from the core services layer
to the data warehouse.



skills   - SQL database design / administration



  - MySQL



  - OS X / Linux



  - ETL



  - Ruby on Rails



Pluses: JRuby, Glassfish





Regards,

Ajay Dubey
Technical Recruiter
Comtec Information Systems
Ph: 703-738-4844
Email : r...@comtecinfo.com
Linkedin :ajay86du...@yahoo.com
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: uniqueness on has_many associations

2009-01-07 Thread tron

Hello Robert,

You misunderstood my problem I guess.

Think of bora as a unique word, with id 1.
there is a dictionary entry for bora bora with id 2
then the phrase components representing this association are not
unique in word_id X dictionary_id (both are 1,2)
only word_id and dictionary_id AND list index (position) meaning
there can only be one word on the same position of a list.

The real problem is that I want to make sure
bora bora is entered only once in the dictionary.

For those who like more examples, think of travel itineraries
(which are a list of cities, say New York - London - Paris - Budapest)
Cities are a table, Itineraries are another and there is a join
model (Visits) which acts as a list.

How do I make sure an itinerary is created only once?

Thanks a million all

Vik



On Jan 7, 5:45 pm, Robert Walker 
wrote:
> tron wrote:
> > class Word
> > end
>
> > class PhraseComponent
> >    belongs_to :word
> >    belongs_to :dictionary_entry
> >    acts_as_list :scope => :dictionary_entry
> > end
>
> > class DictionaryEntry
> >   has_many :phrase_components
> >   has_many :words, :through => :phrase_components
> > end
>
> Well from the database side of thing that's easily solved by adding a
> unique index across the two foreign keys in the join table. That would
> definitely prevent duplicates in the join table.
>
> CREATE UNIQUE INDEX idx_word_dictionary_entry ON phrase_components
> (word_id, dictionary_entry_id);
>
> From the Rails side you might be able to use something like the
> following example:
>
> class TeacherSchedule < ActiveRecord::Base
>   validates_uniqueness_of :teacher_id, :scope => [:semester_id,
> :class_id]
> end
>
> Maybe (untested):
>
> class PhraseComponent < ActiveRecord::Base
>   validates_uniqueness_of :word_id, :scope => :dictionary_entry
>   validates_uniqueness_of :dictionary_entry_id, :scope => :word_id
> end
>
> Note: This may be an expensive method for validating uniqueness!
>
> In any of the cases mentioned you'll still have issues related to
> "Optimistic Concurrency 
> Control:"http://en.wikipedia.org/wiki/Optimistic_concurrency_control
>
> This section of the Rails documentation has a good explanation of these
> issues and some options on how to solve 
> them:http://www.railsbrain.com/api/rails-2.2.2/doc/index.html?a=M001824&na...
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: NEED HELP

2009-01-07 Thread NAYAK
hi,

You can use Transaction functionality for the same
Eg:
User.transaction do


end
if anything fails in between, everything will be reverted

-NAYAK

On Wed, Jan 7, 2009 at 10:06 AM, anton effendi  wrote:

> Hai guys.
> I have problem in Rails.. Can u help me? please.
>
> My problem:
>
> I want to make code for maintenance database... I want like migration...
> can change to another version...
> so when I import some data, I must revert to before version..
>
> example:
> file import 1 --> import to database... version 1
>  user1 add some data
> file import 2 --> import to database... version 2
>  user2 add some data
> file import 3 --> import to database... version 3
>
> if file import 3 wrong data, then I can change to version2 with some
> data form user2.(last data base before file import3 exceuted)
>
>
> do anybody know about it?? if must use plugin.. what are they??
>
>
> Thank you.
>
>
> --
> Wu You Duan
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Fwd: Loading Hash during testing using Fixtures

2009-01-07 Thread Phlip

> one:
>  id: 1
>  options: {name1: value1, name2: value2}

This might be cleaner:

one:
   options:
 name1: value1
 name2: value2

And note you don't need the id: 1 no more.


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread Mike C

I'm having this EXACT same error and was about to post asking for
help. That last post by Fred fixed it. :) However, something weird
happened. I have a database called testapp and it says it can't find
it...I also had 2 mysql_config files on my system.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: controller if statement error with param

2009-01-07 Thread NAYAK
Hi,

are you sure its a string? just check with @state.class, and also try to
print the value before the if (so as to confirm its not getting modified
later on)

-NAYAK

On Wed, Jan 7, 2009 at 11:38 PM, Fididle Fididle <
rails-mailing-l...@andreas-s.net> wrote:

>
> Hi, Please help me with this maddening little problem.
>
> The if statement in the controller (below) does not detect the string
> "ALL" contained in params[:state].  This param was entered in a form
> (not shown here).
>
> I can see on the rendered page (below) that this variable is indeed
> present in the  '@state' variable as it is rendered correctly.
>
> The question then is why the if '@state == "ALL"' condition is not
> "true"? If it were true, @debug should be == 1.
>
> I have also tried using a regex 'if @state =~ /ALL/' to no avail.
>
> Thanks!
>
> --
> controller
> -
> ...
> def search
> ...
>  @state  = params[:state]
>  @debug = 0
>if @state  == "ALL"
>@debug = 1
>end
> ...
> end
>
> -
> view
> -
>
> ...
>
> DEBUG: @state = <%= @state %>
>   DEBUG: @debug = <%= @debug %>
> 
> ...
>
>
> --
> rendered page
> --
>
> DEBUG: @state = ALL
> DEBUG: @debug = 0
>
>
> Thanks!
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR, Apache2, fcgid and ubuntu...

2009-01-07 Thread Sazima



On Jan 7, 4:05 am, ZebaMomin  wrote:
> I'm using the module fcgid with apache and so along with it I need the fcgi
> gem.
> I tried using fastcgi module but it would crashso I switched to fcgid
> which is much reliable than fastcgi...
> I've also installed and used phusion passenger and ruby enterprise
> edition...but no use
> It too gives me a 404 error:-((
>
> Can you please suggest any other way in which I can SUCCESSFULLY deploy my
> rails application on apache?
> Thanks.
>
>
>
> Bobnation wrote:
>
> > I guess my question would start with this: why are you using fcgi?
>
> > On Jan 6, 2:57 am, ZebaMomin  wrote:
> >> Hi.
> >> I'm trying to deploy my rails application on ubuntu server using apache2
> >> and fcgid..but have not been successful..
> >> I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem...
> >> I am able to start apache successfully and view the Aptana RadRails
> >> welcome page..But giving my controller's name gives me a 404 error...
> >> I have made required changes in my /public/.htaccess and
> >> /public/dispatch.fcgi filesas=>
>
> >> .htaccess(w/o comments)
>
> >> AddHandler fastcgi-script .fcgi
> >> AddHandler fcgid-script .fcgi
> >> AddHandler cgi-script .cgi
> >> Options +FollowSymLinks +ExecCGI
> >> dispatch.*fcgi*
> >> RewriteEngine On
> >> RewriteRule ^$ index.html [QSA]
> >> RewriteRule ^([^.]+)$ $1.html [QSA]
> >> RewriteCond %{REQUEST_FILENAME} !-f
> >> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>
> >> ErrorDocument 500 "Application errorRails application failed to
> >> start properly"
>
> >> dispatch.fcgi
>
> >> #!/usr/bin/ruby
> >> require File.dirname(__FILE__) + "/../config/environment"
> >> require 'fcgi_handler'
> >> require 'rubygems'
> >> require_gem 'fcgi'
> >> RailsFCGIHandler.process!
>
> >> I am attaching my httpd.conf file...
>
> >> I have checked that my VirtualHost works perfectly...but it doesn't seem
> >> to start my rails application
>
> >> Can someone please tell me where am I going wrong
> >> Thanks in advance..
>
> >> --
> >> View this message in
> >> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> >> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
>
> --
> View this message in 
> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR, Apache2, fcgid and ubuntu...

2009-01-07 Thread Sazima

Zeba,

You should either use mongrel or passenger.

Cheers, Sazima

On Jan 7, 4:05 am, ZebaMomin  wrote:
> I'm using the module fcgid with apache and so along with it I need the fcgi
> gem.
> I tried using fastcgi module but it would crashso I switched to fcgid
> which is much reliable than fastcgi...
> I've also installed and used phusion passenger and ruby enterprise
> edition...but no use
> It too gives me a 404 error:-((
>
> Can you please suggest any other way in which I can SUCCESSFULLY deploy my
> rails application on apache?
> Thanks.
>
>
>
> Bobnation wrote:
>
> > I guess my question would start with this: why are you using fcgi?
>
> > On Jan 6, 2:57 am, ZebaMomin  wrote:
> >> Hi.
> >> I'm trying to deploy my rails application on ubuntu server using apache2
> >> and fcgid..but have not been successful..
> >> I am using ruby 1.8.6, rails 2.2.2 and fcgi 0.8.7 gem...
> >> I am able to start apache successfully and view the Aptana RadRails
> >> welcome page..But giving my controller's name gives me a 404 error...
> >> I have made required changes in my /public/.htaccess and
> >> /public/dispatch.fcgi filesas=>
>
> >> .htaccess(w/o comments)
>
> >> AddHandler fastcgi-script .fcgi
> >> AddHandler fcgid-script .fcgi
> >> AddHandler cgi-script .cgi
> >> Options +FollowSymLinks +ExecCGI
> >> dispatch.*fcgi*
> >> RewriteEngine On
> >> RewriteRule ^$ index.html [QSA]
> >> RewriteRule ^([^.]+)$ $1.html [QSA]
> >> RewriteCond %{REQUEST_FILENAME} !-f
> >> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>
> >> ErrorDocument 500 "Application errorRails application failed to
> >> start properly"
>
> >> dispatch.fcgi
>
> >> #!/usr/bin/ruby
> >> require File.dirname(__FILE__) + "/../config/environment"
> >> require 'fcgi_handler'
> >> require 'rubygems'
> >> require_gem 'fcgi'
> >> RailsFCGIHandler.process!
>
> >> I am attaching my httpd.conf file...
>
> >> I have checked that my VirtualHost works perfectly...but it doesn't seem
> >> to start my rails application
>
> >> Can someone please tell me where am I going wrong
> >> Thanks in advance..
>
> >> --
> >> View this message in
> >> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> >> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
>
> --
> View this message in 
> context:http://www.nabble.com/RoR%2C-Apache2%2C-fcgid-and-ubuntu...-tp2130562...
> Sent from the RubyOnRails Users mailing list archive at Nabble.com.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Hosting

2009-01-07 Thread Sazima

Pete,

Since you have multiple apps, you should look for a provider that
offers Passenger. I had a similar setup whith 3 apps, each run by 4
mongrels. Result: out of memory! With Passenger you don't waste
resources on apps without traffic at any given moment.

Cheers, Sazima

On Jan 6, 5:35 pm, pete  wrote:
> Hi-
>
> I've done some searching, but since there are many options, I'd like
> to get some feedback from the group at large.
>
> I have a couple of Rails apps that will likely not see too much
> traffic and I would like to find a public home for them.  Since these
> sites are not generating any revenue for me, I'd like to find a less
> expensive home.
>
> Anyone have a suggestion, or know of a good resource, for a good, less-
> expensive hosting service to get up and running?
>
> 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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread Frederick Cheung


On 7 Jan 2009, at 18:05, jabauer wrote:





On Jan 7, 12:40 pm, Frederick Cheung 
wrote:


Where is mysql installed ?

Fred



have you tried sudo gem install mysql -- --with-mysql-config=/usr/ 
local/mysql/bin/mysql_config

?

Fred

It should be in /usr/local/mysql/bin/mysql
At least that is what "which mysql" is giving me, although at this
point there may be more than one copy of the software on my machine.

--Jean--
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---





smime.p7s
Description: S/MIME cryptographic signature


[Rails] Re: :after_update_element and text_field_with_auto_complete

2009-01-07 Thread Peter Jeppesen

Am I totally misunderstanding something here or...
Please help! - I'm really stuck on this!
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Fwd: change javascript default from jquery back to prototype

2009-01-07 Thread Dingding Ye
check this variable in console:

>> ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES


On Thu, Jan 8, 2009 at 12:46 AM, Felipe Gallois wrote:

> already did it, no luck
>
> On Wed, Jan 7, 2009 at 14:44, Freddy Andersen wrote:
>
>>
>> Remove the vendor/plugin/jrails directory and remove the jquery
>> scripts in public/javascripts/
>>
>> That should be all you need todo...
>>
>>
>
>
> --
> gallois
> aka Felipe Gallois
> blog: www.gallois.com.br/blog
> fanglib homepage: www.gallois.com.br/fanglib
>
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New cheat sheet: Jump Start Credit Card Processing in Ru

2009-01-07 Thread Amy Hoy

Hassan Schroeder wrote:

> Major props for creating the CC guide with an aspect ratio that makes
> sense for reading online.  :-)

Thanks, Hassan :) I'm always trying to learn & get better :)

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] controller if statement error with param

2009-01-07 Thread Fididle Fididle

Hi, Please help me with this maddening little problem.

The if statement in the controller (below) does not detect the string
"ALL" contained in params[:state].  This param was entered in a form
(not shown here).

I can see on the rendered page (below) that this variable is indeed
present in the  '@state' variable as it is rendered correctly.

The question then is why the if '@state == "ALL"' condition is not
"true"? If it were true, @debug should be == 1.

I have also tried using a regex 'if @state =~ /ALL/' to no avail.

Thanks!

--
controller
-
...
def search
...
  @state  = params[:state]
  @debug = 0
if @state  == "ALL"
@debug = 1
end
...
end

-
view
-

...

DEBUG: @state = <%= @state %>
   DEBUG: @debug = <%= @debug %>

...


--
rendered page
--

DEBUG: @state = ALL
DEBUG: @debug = 0


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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread jabauer



On Jan 7, 12:40 pm, Frederick Cheung 
wrote:

> Where is mysql installed ?
>
> Fred


It should be in /usr/local/mysql/bin/mysql
At least that is what "which mysql" is giving me, although at this
point there may be more than one copy of the software on my machine.

--Jean--
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: uniqueness on has_many associations

2009-01-07 Thread Robert Walker

tron wrote:
> class Word
> end
> 
> class PhraseComponent
>belongs_to :word
>belongs_to :dictionary_entry
>acts_as_list :scope => :dictionary_entry
> end
> 
> class DictionaryEntry
>   has_many :phrase_components
>   has_many :words, :through => :phrase_components
> end
> 

Well from the database side of thing that's easily solved by adding a 
unique index across the two foreign keys in the join table. That would 
definitely prevent duplicates in the join table.

CREATE UNIQUE INDEX idx_word_dictionary_entry ON phrase_components 
(word_id, dictionary_entry_id);

>From the Rails side you might be able to use something like the 
following example:

class TeacherSchedule < ActiveRecord::Base
  validates_uniqueness_of :teacher_id, :scope => [:semester_id, 
:class_id]
end

Maybe (untested):

class PhraseComponent < ActiveRecord::Base
  validates_uniqueness_of :word_id, :scope => :dictionary_entry
  validates_uniqueness_of :dictionary_entry_id, :scope => :word_id
end

Note: This may be an expensive method for validating uniqueness!

In any of the cases mentioned you'll still have issues related to 
"Optimistic Concurrency Control:"
http://en.wikipedia.org/wiki/Optimistic_concurrency_control

This section of the Rails documentation has a good explanation of these 
issues and some options on how to solve them:
http://www.railsbrain.com/api/rails-2.2.2/doc/index.html?a=M001824&name=validates_uniqueness_of


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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Passing information to the controller from view

2009-01-07 Thread Frederick Cheung


On 7 Jan 2009, at 17:33, Ryan Mckenzie wrote:

>
> Hi everyone,
>
> I have a template called createFile.html.erb which has some ruby  
> code in
> it.  The ruby code pulls information from the database because i'm
> looping through some records.  Is it possible to send all of the
> information in the createFile.html.erb output to the createFile method
> in the controller? I'm wanting to save the content of it all to a text
> file...
>
render_to_string ?

Fred
> Or is there an easier way to produce the same outcome?
>
> Thanks,
> McKenzie.
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread Frederick Cheung


On 7 Jan 2009, at 17:23, jabauer wrote:

>
> Thanks for pointing that out.  Unfortunately, after I went through all
> of Dan Benjamin's directions it still failed to load the mysql gem.  I
> got the following error message:
>
Where is mysql installed ?

Fred
> sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
> Password:
> Building native extensions.  This could take a while...
> ERROR:  Error installing mysql:
>   ERROR: Failed to build gem native extension.
>
> /usr/local/bin/ruby extconf.rb install mysql -- --with-mysql-dir=/usr/
> local/mysql
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lm... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lz... yes
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lsocket... no
> checking for mysql_query() in -lmysqlclient... no
> checking for main() in -lnsl... no
> checking for mysql_query() in -lmysqlclient... no
> *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.
>
> Any thoughts?  And many thanks.
>
> --Jean--
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Passing information to the controller from view

2009-01-07 Thread Ryan Mckenzie

Hi everyone,

I have a template called createFile.html.erb which has some ruby code in
it.  The ruby code pulls information from the database because i'm
looping through some records.  Is it possible to send all of the
information in the createFile.html.erb output to the createFile method
in the controller? I'm wanting to save the content of it all to a text
file...

Or is there an easier way to produce the same outcome?

Thanks,
McKenzie.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread jabauer

Thanks for pointing that out.  Unfortunately, after I went through all
of Dan Benjamin's directions it still failed to load the mysql gem.  I
got the following error message:

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install mysql -- --with-mysql-dir=/usr/
local/mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Any thoughts?  And many thanks.

--Jean--
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Actionmailer and postfix settings

2009-01-07 Thread tyliong

Hi,

I am having problems configuring my actionmailer to work with postfix.

I followed this tutorial: 
http://howtoforge.org/virtual-users-and-domains-postfix-courier-mysql-centos5.1

and i got the server set up.

at first i fixed the mail settings to work with gmail using this
tutorial:

http://www.danielfischer.com/2008/01/09/how-to-use-gmail-as-your-mail-server-for-rails/

and my app worked with gmail.

but now i want it to work with my newly built email server. I read
somewhere if your server has tls u have to do something special with
actionmailer for it to work so i am relying on fischer's workaround.

so i inputed this into the mailer.yml file that danielfischer created:

:address: localhost
:port: 25
:domain: localhost
:user_name: mai...@mydomain.com
:password: secret
:authentication: :plain
:tls: true

Should i have used mydomain instead of localhost?
I just can't seem to get it to connect there is nothing in my  tail -
f /var/log/maillog error
Please help!
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] radio_button_tag

2009-01-07 Thread Shandy Nantz

I have an app that needs to collect data on gender, so I have:

Male:
<%= radio_button_tag( :gender, :male,
  :checked => @user.gender.to_s == 'Male' ? true : false,
  :options => {:onclick => func2} )%>

Female:
<%= radio_button_tag( :gender, :female,
  :checked => @user.gender.to_s == 'Female' ? true : false,
  :options => {:onclick => func1} )%>


I have some remote_function calling stuff happening in the background,
everything works great it terms of saving the information, the issue it
is not showing the corect selected radio button for what is actually
saved by the user. For example, if the user selects 'Male', the app
shows 'Female' as selected. It 'Female' is slected it is correct but
only because it is the last button rendered. What it is doiing is
setting both buttons checked value to 'checked', which it should not be
doing. I have tried several different way to try and get the correct
radio button to display as checked, such as:

<%= radio_button_tag( :gender, :male,
  :checked => @user.gender.to_s == 'Male' ? 'checked' : '',
  :options => {:onclick => func1} )%>

This didn't work either. Anyone know what I am doing wrong. Thanks for
any and all help?

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New cheat sheet: Jump Start Credit Card Processing in Ru

2009-01-07 Thread Hassan Schroeder

On Wed, Jan 7, 2009 at 8:44 AM, Amy Hoy
 wrote:

> ... I don't know if you're familiar with my older cheat sheets.

Amy, thanks for those links, but looking at one also reminded me --

Major props for creating the CC guide with an aspect ratio that makes
sense for reading online.  :-)

One of the main reasons I generally despise PDF is having to scroll
up and down to read something formatted for an vertically oriented
8.5x11"/A4 printed page rather than a typical wider-than-tall screen.

So thank you, thank you, thank you!

-- 
Hassan Schroeder  hassan.schroe...@gmail.com

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Problems with SQL Server 2008 and migrations using activerecord-odbc-adapter gem

2009-01-07 Thread Brian Hogan

Have you tried using this instead?

http://github.com/rails-sqlserver/2000-2005-adapter/tree/master

We don't use the activerecord-odbc adapter for our apps. We also
install ruby-odbc and ruby dbi from source rather than from gems, but
I hear that gems work fine

  $ gem install dbi --version 0.4.0
  $ gem install dbd-odbc --version 0.2.4

I can't say if this works on 2008 because I've been too busy to test
it, so if it doesn't, I apologize. However, I've monkeyed with the
sqlserver adapters in the past and patching it should be trivial.

Let us know how it goes!

On Wed, Jan 7, 2009 at 11:01 AM, Ben  wrote:
>
> Can any one else please help me to confirm that migrations are broken
> against SQL Server 2008? I'm running Rails 2.2.2 and activerecord-odbc-
> adapter 2.0 gem. I've created a system DSN to my test database using
> an authenticated connection.
>
> I've created a single migration to make a table with a few columns in
> it and when you run the 'rake db:migrate' the first time, everything
> works correctly. However, if you run it again (which shouldn't change
> anything) I get the following error
>
> 'rake aborted!
> S0001 (2714) [Microsoft][ODBC SQL Server Driver][SQL Server]There is
> already an object named 'schema_migrations' in the database.
>
> I think the 'activerecord-odbc-adapter' gem isn't compatible with SQL
> Server 2008 as I've tested the same migration against SQL Server 2000
> and that seems to work fine. Does anyone else know of another gem/
> plugin that allows authenticated connections to SQL Server 2008 that
> works properly?
>
> 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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Problems with SQL Server 2008 and migrations using activerecord-odbc-adapter gem

2009-01-07 Thread Ben

Can any one else please help me to confirm that migrations are broken
against SQL Server 2008? I'm running Rails 2.2.2 and activerecord-odbc-
adapter 2.0 gem. I've created a system DSN to my test database using
an authenticated connection.

I've created a single migration to make a table with a few columns in
it and when you run the 'rake db:migrate' the first time, everything
works correctly. However, if you run it again (which shouldn't change
anything) I get the following error

'rake aborted!
S0001 (2714) [Microsoft][ODBC SQL Server Driver][SQL Server]There is
already an object named 'schema_migrations' in the database.

I think the 'activerecord-odbc-adapter' gem isn't compatible with SQL
Server 2008 as I've tested the same migration against SQL Server 2000
and that seems to work fine. Does anyone else know of another gem/
plugin that allows authenticated connections to SQL Server 2008 that
works properly?

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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: uniqueness on has_many associations

2009-01-07 Thread tron

Hello,
I am still trying to find a solution to this.
Please feel free to throw any ideas at me or help me find the
appropriate forum.
Thank you
V

On Jan 6, 12:55 pm, tron  wrote:
> Dear List,
>
> This may not be rails unique but what is the best practice to validate
> theuniquenessof has_many associations.
> In particular the models are
>
> class Word
> end
>
> class PhraseComponent
>    belongs_to :word
>    belongs_to :dictionary_entry
>    acts_as_list :scope => :dictionary_entry
> end
>
> class DictionaryEntry
>   has_many :phrase_components
>   has_many :words, :through => :phrase_components
> end
>
> Dictionary entries  (words and phrases) are composed of words (which
> are uniq)
> and I want to check the same phrase occurs only once in the
> DictionaryEntry table.
>
> Is there a better or more efficient way to do this than create and
> update a footprint
> of the word associations on dictionary entries?
> This means I would have a string field in the dictionary_entries table
> which is a concatenation of
> the associated words and would check the uniquness of that.
>
> If we generalize the problem, we need to assureuniquenessof lists of
> arbitrary objects (where a list is via a join table), in that case the
> only representation that I can create on the list is the concatenation
> of ids of list items and check theuniquenessof this?
> I begin to think there must be a more canonical way to handle this.
> Any help appreciated
>
> Viktor
>
> I found someone asking the same question but no reply followed.
>
> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/...
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Fwd: change javascript default from jquery back to prototype

2009-01-07 Thread Felipe Gallois
already did it, no luck

On Wed, Jan 7, 2009 at 14:44, Freddy Andersen  wrote:

>
> Remove the vendor/plugin/jrails directory and remove the jquery
> scripts in public/javascripts/
>
> That should be all you need todo...
> >
>


-- 
gallois
aka Felipe Gallois
blog: www.gallois.com.br/blog
fanglib homepage: www.gallois.com.br/fanglib

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Fwd: change javascript default from jquery back to prototype

2009-01-07 Thread Freddy Andersen

Remove the vendor/plugin/jrails directory and remove the jquery
scripts in public/javascripts/

That should be all you need todo...
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New cheat sheet: Jump Start Credit Card Processing in Ru

2009-01-07 Thread Amy Hoy

Matt Grande wrote:
> This is fantastic, and just in the nick of time.

Glad it's helpful :) We'll be blogging more about this stuff on our 
site: http://letsfreckle.com/blog.

> What other guides have you guys written?

None like this, yet.

We're working on a ~60-page ebook on JavaScript performance and scaling, 
specifically, that I hope to publish in February, for $29 (including 
some awesome tools we'll also OSS later).

Sign up for the email list on jumpstartcc.com and I'll send you an early 
adopter discount ;)

Matt, I don't know if you're familiar with my older cheat sheets. 
They're not this big, but clearly I've been working up to it:

http://www.slash7.com/cheats/activerecord_cheatsheet.pdf
http://www.slash7.com/cheats/form_helpers.pdf
http://www.slash7.com/cheats/scriptaculous_fx1.pdf
http://www.slash7.com/articles/2006/10/8/rjs-demistified-with-pretty-colors

For the record, I do these up in Omnigraffle, although I'm about to 
ditch that in favor of either Keynote (unlikely) or InDesign (likely) 
for any future 10-pagers. I am an OG ninja, though, so I don't think I'd 
recommend the tool to anyone else.

> Where did you get all these cool little images? Do you crate them yourself or 
> do you have a pool of images in which you can pick?

The illustrations are from istockphoto.com. I probably dropped about 
$100-$120 on stock art for this baby. I do not like to do a half-assed 
job.

Thanks for all the feedback :D

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Link_to within an HTML table

2009-01-07 Thread Shandy Nantz

> Any thoughts as to why link_to does not work from within a table?

Have you checked your logs to see if there is any errors being thrown?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Fwd: change javascript default from jquery back to prototype

2009-01-07 Thread Felipe Gallois
Hello all,

recently I installed the jrails plugin which changed the
javascript_include_tag :defaults to include the jquery libraries...

The jquery did no good, so I want the prototype back, but i can't manage to
get the :defaults to include its libraries to me...

any tips on that are greatly appreciated!!

thanks and cheers!

-- 
gallois
aka Felipe Gallois
blog: www.gallois.com.br/blog
fanglib homepage: www.gallois.com.br/fanglib

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Problems with EasyEclipse Ruby Rails 1.2.2.2

2009-01-07 Thread Samuel Nilsson

Hi,

I'm a real newbie both in Rails and Ubuntu but I'm going to learn Ruby
on Rails for a schoolproject. I've tried to find out what IDE is best
according to different tutorials and blogs and have chosen to download
easyeclipse-ruby-rails-1.2.2.2.tar.gz.

My problem is that when i start the program an error popup is shown:

"An error has occurred. See the log file.
/home/samuel/rails_apps/.metadata/.log."

What is this? When I check the log file it says the following:

!SESSION 2009-01-07 15:47:36.488
---
eclipse.buildId=M20070212-1330
java.version=1.5.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86

!ENTRY org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Warnings while parsing the view contributions from the
'org.eclipse.ui.viewActions' extension point
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewResourceNavigator/eclipseutilplugins.ResourceAction1'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewResourceNavigator/eclipseutilplugins.ResourceAction2'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewResourceNavigator/eclipseutilplugins.ResourceAction3'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewResourceNavigator/eclipseutilplugins.ResourceAction4'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewPackageExplorer/eclipseutilplugins.PackageAction1'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewPackageExplorer/eclipseutilplugins.PackageAction2'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.477
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewPackageExplorer/eclipseutilplugins.PackageAction3'
!SUBENTRY 1 org.eclipse.ui 2 0 2009-01-07 15:47:46.478
!MESSAGE Actions require a non-empty label or definitionId:
plug-in='ru.nlmk.eclipseutilplugins',
id='AUTOGEN:::eclipseutilplugins.viewPackageExplorer/eclipseutilplugins.PackageAction4'

!ENTRY org.eclipse.osgi 4 0 2009-01-07 15:47:50.675
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles
(java.lang.UnsatisfiedLinkError:
/home/samuel/Downloads/easyeclipse-ruby-rails-1.2.2.2/configuration/org.eclipse.osgi/bundles/7/1/.cp/libswt-mozilla-gtk-3236.so:
Can't load IA 32-bit .so on a IA 32-bit platform)
at org.eclipse.swt.SWT.error(SWT.java:3400)
at org.eclipse.swt.SWT.error(SWT.java:3297)
at org.eclipse.swt.browser.Browser.(Browser.java:168)
at
org.radrails.rails.internal.ui.railsplugins.RailsPluginsPage.createListControls(RailsPluginsPage.java:115)
at
org.radrails.rails.internal.ui.railsplugins.RailsPluginsPage.createControl(RailsPluginsPage.java:54)
at
org.radrails.rails.internal.ui.railsplugins.RailsPluginsView.createPluginsPage(RailsPluginsView.java:70)
at
org.radrails.rails.internal.ui.railsplugins.RailsPluginsView.createDefaultPage(RailsPluginsView.java:39)
at
org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:473)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144)
at
org.eclipse.ui.internal.PartStack.createControl(PartStack.java:620)
at
org.eclipse.ui.internal.PartStack.createControl(PartStack.java:532)
at
org.eclipse.ui.internal.PartSashCont

[Rails] how rails insert object id to database?

2009-01-07 Thread Zhenning Guan

 [4;35;1mUser Create (0.5ms) [0m[0mINSERT INTO `users` (`name`,
`avatar_file_name`, `avatar_file_size`, `created_at`, `updated_at`,
`avatar_content_type`) VALUES('hello', 'Screenshot.png', 253800,
'2009-01-08 08:27:19', '2009-01-08 08:27:19', 'image/png') [0m
[paperclip] Saving attachments.
[paperclip] Saving files for avatar
[paperclip] Deleting files for avatar
[paperclip] Writing files for avatar
[paperclip] ->
/home/ning/pa/public/system/avatars/34/medium/Screenshot.png
[paperclip] ->
/home/ning/pa/public/system/avatars/34/original/Screenshot.png
[paperclip] ->
/home/ning/pa/public/system/avatars/34/thumb/Screenshot.png
   [4;36;1mSQL (45.3ms) [0m[0;1mCOMMIT [0m
Redirected to /users/34
Completed in 1500ms (DB: 47) | 302 Found [http://127.0.0.1/users]


Processing UsersController#show (for 127.0.0.1 at 2009-01-08 00:27:19)
[GET]
  Parameters: {"id"=>"34"}
   [4;35;1mSQL (0.1ms) [0m[0mSET NAMES 'utf8' [0m
   [4;36;1mSQL (0.1ms) [0m[0;1mSET SQL_AUTO_IS_NULL=0 [0m
   [4;35;1mUser Columns (0.9ms) [0m[0mSHOW FIELDS FROM `users` [0m
   [4;36;1mUser Load (0.3ms) [0m[0;1mSELECT * FROM `users` WHERE
(`users`.`id` = 34)  [0m
Rendering users/show


===
as all of you can see
==
INSERT INTO `users` (`name`, `avatar_file_name`, `avatar_file_size`,
`created_at`, `updated_at`, `avatar_content_type`) VALUES('hello',
'Screenshot.png', 253800, '2009-01-08 08:27:19', '2009-01-08 08:27:19',
'image/png')
==
it doesn't create a id 34, but move on , We see
==
SELECT * FROM `users` WHERE (`users`.`id` = 34)  [0m
==

Oops. How and when rails insert object id to database?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New cheat sheet: Jump Start Credit Card Processing in Ruby

2009-01-07 Thread huard.el...@gmail.com

Hi,
very nice ! (though mostly US-centric ;-) )
Another good source, if you want to use Paypal specifically, are Ryan
Bates's last 3 RailsCasts.
Rgds,

Elise

On Jan 7, 5:16 pm, Matt Grande  wrote:
> This is fantastic, and just in the nick of time.
>
> What other guides have you guys written?
>
> On Jan 6, 10:46 am, Amy Hoy  wrote:
>
> > Hey guys... it's me ;)
>
> > I've come out of a long cheat sheet-free period!
>
> > I want to share with you my new, really massive "cheat sheet" on credit
> > card processing:
>
> > * the process,
> > * how it works,
> > * what you need to get the right accounts, and of course,
> > * how to get started with ActiveMerchant.
>
> > Download it here:http://jumpstartcc.com/
>
> > Aaaand... Thomas Fuchs contributed a spiffy JavaScript for detecting CC
> > types and validating against the Luhn10 algorithm.
>
> > This little guide is based on what we learned developing our new time
> > tracking service, freckle:http://letsfreckle.com. Even with the help of
> > some excellent existing libraries, the whole process was brutal!
>
> > I hate being brutalized! And there is crap all for resouces out there on
> > this topic, so I figured I'd share the knowledge. :)
>
> > Let me know what you think!
>
> > Amy
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread Frederick Cheung


On 7 Jan 2009, at 16:16, jabauer wrote:

>
> On Monday I "upgraded" from Rails 1.2.6 to 2.2.2 (also upgrading to
> gem 1.3.1) but in the process have lost the ability to connect with my
> mysql database.  After finally reinstalling the MySQL gem with the
> following gerrymandered command I found on a website (http://
> involution.com/category/ruby-on-rails/):
>
> sudo env ARCHFLAGS="-arch ppc64″ gem install -V mysql -- -with- 
> mysql-
> include=/usr/local/mysql/include/ -with-mysql-lib=/usr/local/mysql/lib
> -with-mysql-config=/usr/local/mysql/bin/mysql_config -with-mysql-dir=/
> usr/local/mysql

You don't want to be setting the arch to ppc64 though - you're on an  
intel machine and you've just told it to build a gem that will only  
work on PowerPC machines! The architecture should be i386
>
The instructions on http://danbenjamin.com/articles/2008/02/ruby-rails-leopard 
  are usually good.

Fred
>
>
> It still doesn't work!  After attempting to access one of my views in
> Firefox (3.0.3) I got the following error message:
>
> !!! The bundled mysql.rb driver has been removed from Rails 2.2.
> Please install the mysql gem and try again: gem install mysql.
> /!\ FAILSAFE /!\  Wed Jan 07 10:57:23 -0500 2009
>  Status: 500 Internal Server Error
>  dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9):
> no suitable image found.  Did find:
>   /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: mach-o, but
> wrong architecture - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
> mysql.bundle
>/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
>
> Simply running "gem install mysql" still doesn't work (hence the hyper
> specific command above).
>
> I'm running Mac OS X 10.5.6 on a MacBook with Intel Core 2 Duo.
>
> If anyone has any suggestions I'm all ears.  I've been locked out of
> my rails system for 2 days now and really need to get back to work.
>
> Many thanks.
>
> --Jean--
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: YUI vs GWT vs ExtJS vs ????

2009-01-07 Thread Sma Yima

I like this example and try to use extjs-gwt in eclipse project. This is 
my first article about extjs-gwt:gxt
http://extjs-gwt.blogspot.com
See more about  Extjs-GWT GXT on Eclipse.
I think this extjs-gwt article can help beginner to learn.
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Database.yml password and security

2009-01-07 Thread pikz

I would like to ask if it's less secure to grant all privileges in
MySQL to the user running the application, instead of having the
password in the database.yml file?

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: How to upgrade an existing application to 2.2.2?

2009-01-07 Thread Wouter

> So now, I would like to go add a page to the Wiki that says something like:
>
> If you want to update to a newer version of Rails, here is what you should
> do:
>
> 1) Run "rake test" and make sure that all of your tests pass.
> 2) Ensure that you have the newer version of Rails installed (e.g. via "gem
> update")
> 3) Check in your code using your favorite SCMS.
> 4) Edit config/environment.rb and set RAILS_GEM_VERSION to match the version
> of Rails to which you wish to update
> 5) run "rake update" to update the configuration files (such as boot.rb and
> environment.rb), scripts, and javascript files to reflect the newer version
> of Rails.
> 6) run "rake test" to make sure that all of your tests still pass
> 7) Fire up your browser and make sure things look "normal" (for suitable
> definition of "normal").
>
> Does this sound about right to folks?  Is there any reason (within reason)
> that this same procedure couldn't be used to downgrade an application (say,
> for example, if you wanted to use a plugin that only worked with 2.1.0, and
> you had been developing in 2.2.2)?  I wouldn't expect it to work to switch
> from 2.2.2 to, say, 0.3.1, but it seems like it ought to work for anything
> in the 2.x.y series.
>
> --wpd

Worked out perfect for me. I updated a Rails 2.1 (Restful
Authentication with all the bells and whistles (new 9/05/08)) app to
enable ActiveScaffolding (which works only on rails 2.2. Tnx.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: New cheat sheet: Jump Start Credit Card Processing in Ruby

2009-01-07 Thread Matt Grande

This is fantastic, and just in the nick of time.

What other guides have you guys written?

On Jan 6, 10:46 am, Amy Hoy  wrote:
> Hey guys... it's me ;)
>
> I've come out of a long cheat sheet-free period!
>
> I want to share with you my new, really massive "cheat sheet" on credit
> card processing:
>
> * the process,
> * how it works,
> * what you need to get the right accounts, and of course,
> * how to get started with ActiveMerchant.
>
> Download it here:http://jumpstartcc.com/
>
> Aaaand... Thomas Fuchs contributed a spiffy JavaScript for detecting CC
> types and validating against the Luhn10 algorithm.
>
> This little guide is based on what we learned developing our new time
> tracking service, freckle:http://letsfreckle.com. Even with the help of
> some excellent existing libraries, the whole process was brutal!
>
> I hate being brutalized! And there is crap all for resouces out there on
> this topic, so I figured I'd share the knowledge. :)
>
> Let me know what you think!
>
> Amy
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] RoR 2.2.2 and MySQL -- HELP

2009-01-07 Thread jabauer

On Monday I "upgraded" from Rails 1.2.6 to 2.2.2 (also upgrading to
gem 1.3.1) but in the process have lost the ability to connect with my
mysql database.  After finally reinstalling the MySQL gem with the
following gerrymandered command I found on a website (http://
involution.com/category/ruby-on-rails/):

sudo env ARCHFLAGS="-arch ppc64″ gem install -V mysql -- -with-mysql-
include=/usr/local/mysql/include/ -with-mysql-lib=/usr/local/mysql/lib
-with-mysql-config=/usr/local/mysql/bin/mysql_config -with-mysql-dir=/
usr/local/mysql

It still doesn't work!  After attempting to access one of my views in
Firefox (3.0.3) I got the following error message:

!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
/!\ FAILSAFE /!\  Wed Jan 07 10:57:23 -0500 2009
  Status: 500 Internal Server Error
  dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9):
no suitable image found.  Did find:
/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: mach-o, but
wrong architecture - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/
mysql.bundle
/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle

Simply running "gem install mysql" still doesn't work (hence the hyper
specific command above).

I'm running Mac OS X 10.5.6 on a MacBook with Intel Core 2 Duo.

If anyone has any suggestions I'm all ears.  I've been locked out of
my rails system for 2 days now and really need to get back to work.

Many thanks.

--Jean--
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Gems between two different machines

2009-01-07 Thread NAYAK
Hi,

I have used gemsonrails(*gemsonrails*.rubyforge.org) plugin which helps us
to freeze gems to a rails application. By this you can run your rails
application with just ruby installed on any new machine

-NAYAK

On Mon, Jan 5, 2009 at 11:58 PM, jschank  wrote:

>
> Thanks for the reply.
>
> Freezing the gems is certainly possible, but what about using gems
> outside of rails?
>
> Basically I'm just wondering if there is a really simple way to keep
> two or more machines in sync with the same versions of various gems.
> Aside from tediously listing the gems on one machine, and then
> installing the missing ones on the other. And vice-versa.
>
> John
> >
>

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Link_to within an HTML table

2009-01-07 Thread Frederick Cheung


On 7 Jan 2009, at 16:10, srj wrote:

>
> I am using Rails 2.2.2 and put together a show.html.erb template to
> display relevant details of my model (model A).  Model A has a one-to-
> many relationship to another model model B, and those details are
> displayed as individual rows in a table.  One of those columns is a
> link to another show page on model B's controller to display model B's
> details.  I use:
>
>   <%   for   b_model   in   a_model.get_all_b_children   %>
>
> to loop through all the children (B's)
>
> This all works and looks just as I expected, with one exception - the
> link displayed in the table shows up as a link, but it is not
> clickable - my pointer does not change and if I click it, nothing
> happens.  It looks like it is nothing more than underlined text.
>
I'd guess you've generated invalid html. Have your tried pasting the  
html  into the w3c validator ?

Fred
> If I pull the link_to call out of my table (out of the for-loop) and
> place it elsewhere on the page, it works perfectly (of course, I need
> to manually dig model B out of model A, but I believe that is
> immaterial).
>
> Any thoughts as to why link_to does not work from within a table?
>
> Thank you for any help,
>
> Steve
> >


--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Link_to within an HTML table

2009-01-07 Thread srj

I am using Rails 2.2.2 and put together a show.html.erb template to
display relevant details of my model (model A).  Model A has a one-to-
many relationship to another model model B, and those details are
displayed as individual rows in a table.  One of those columns is a
link to another show page on model B's controller to display model B's
details.  I use:

   <%   for   b_model   in   a_model.get_all_b_children   %>

to loop through all the children (B's)

This all works and looks just as I expected, with one exception - the
link displayed in the table shows up as a link, but it is not
clickable - my pointer does not change and if I click it, nothing
happens.  It looks like it is nothing more than underlined text.

If I pull the link_to call out of my table (out of the for-loop) and
place it elsewhere on the page, it works perfectly (of course, I need
to manually dig model B out of model A, but I believe that is
immaterial).

Any thoughts as to why link_to does not work from within a table?

Thank you for any help,

Steve
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Anyone Recommend a File Uploader

2009-01-07 Thread Dave Smith


>   
> <%= f.label :description %>
> <%= f.text_field :description %>
>   
>   
> <%= f.label :date_due %>
> <%= f.calendar_date_select :date_due %>
>   
> 
>   <%= f.file_field :uploaded_data %>
> 
>   
> <%= f.submit "Create" %>
>   
> <% end %>

i forgot to state, that i already had the multipart code in there. so i 
dont thin the problem is that
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Migration problem in rail 2.0 and observers

2009-01-07 Thread Hans Marmolin

I have a somewhat confusing error !!
U
I am using ruby 1.8.7 rails 2.0 and text mate and have observers that
are defined in cofiguration file as
config.active_record.observers = :flock_observer, :text_observer
I cannot use migrate when this configuration is active, I had to delete
it to be able to migrate. After the migration I add the configuration
again and all is OK!
What could be the reason for that behavior ?
How could one fix it ?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Anyone Recommend a File Uploader

2009-01-07 Thread Dave Smith


>  Example:
><% form_for(:attachment_metadata, :url => { :action =>
> "create" }, :html => { :multipart => true }) do |form| %>
> 
>2. Use the file_field helper with :uploaded_data as the field name.
>  Example:
><%= form.file_field :uploaded_data %>
> 
> I suspect you didn't include the multipart option.
> 
> 
> Best regards
> 
> Peter De Berdt

Hi Peter,

Many thanks for your answer, I have included this in my code. This is my 
entire new.html.erb file.


<% form_for(@project, :html => {:multipart => true}) do |f| %>
  <%= f.error_messages %>
   
<%= f.label :name %>
<%= f.text_field :name %>
  
  
<%= f.label :description %>
<%= f.text_field :description %>
  
  
<%= f.label :date_due %>
<%= f.calendar_date_select :date_due %>
  

  <%= f.file_field :uploaded_data %>

  
<%= f.submit "Create" %>
  
<% end %>


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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: changing order of hash

2009-01-07 Thread David Nicholson

Thanks a lot

The array method did the trick.

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

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Re: Rails Hosting

2009-01-07 Thread Denis Haskin
Or linode.

(no affiliation, just a happy linode customer)

dwh

John Yerhot wrote:
> in that case, I'd just get a $20 slice at Slicehost.
>
>   

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



[Rails] Update specific div using post request.

2009-01-07 Thread Sunny Bogawat

It is possible to update specific div in my rhtml file using post
request like ajax do?
-- 
Posted via http://www.ruby-forum.com/.

--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~--~~~~--~~--~--~---



  1   2   >