[Rails] Re: Upgraded to Rails 2.2.0 -- bringing up Mongrel now fails

2008-11-13 Thread Freddy Andersen
Have a look at this: http://github.com/rails/rails/commit/2463e38efd3cbcc10e7b0a93ad9c2d2224340668 --~--~-~--~~~---~--~~ 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

[Rails] Re: Ruby on rails and Authorized.net

2008-11-10 Thread Freddy Andersen
You should not need ssl since that is only client [SSL]= webserver... the backend (ruby) is whats talks to authnet.. . --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: gems not loading and causing Internal Server Error

2008-11-07 Thread Freddy Andersen
I have seen stuff like this before and it was environment issues... The rake command was running from a different install of ruby than the console/server scripts... Did you install ruby from source and maybe you have the rpms for ruby installed...

[Rails] Re: Still undefined pagination

2008-11-06 Thread Freddy Andersen
You dont need svn or git to install the plugin... Just get the download from the project site and extract it to your vendor/plugin directory... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Active Merchant Example

2008-11-06 Thread Freddy Andersen
When I did this I used a checkout controller that uses an external order helper module... The order helper does all the checking and validation before my checkout controller does @order.save then if that works I do @order.process which then does all the payment stuff in the order model... So the

[Rails] Re: Active Merchant Example

2008-11-05 Thread Freddy Andersen
You can look at this code http://code.google.com/p/substruct/ --~--~-~--~~~---~--~~ 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

[Rails] Re: images folder concern when deploying with Capistrano and

2008-11-03 Thread Freddy Andersen
Hi Tony... the rm line is only there for the release_path directory which either will have the symlink OR an empty directory that was checked-out from git. If the developers wants a few test images in git for testing you can do that but need to remove that when it is deployed to prod before you

[Rails] Re: images folder concern when deploying with Capistrano and git

2008-11-01 Thread Freddy Andersen
That is how Capistrano is supposed to work. You checkout new code from your repo and the current link is replaced with the latest checkout in releases/datestamp. Just like Tim said when you have content that needs to be shared between releases you need to put that somewhere else LIKE the shared

[Rails] Re: Railscast 75, Observe_field and Shopping Cart

2008-10-25 Thread Freddy Andersen
The cost you should get when you get to the controller... Just send the id of the product and find the cost when you get to the controller... About the quantity, not sure about the observer but I just added a remote_form that has the quantity property: % remote_form_for :quantity, :url = {

[Rails] Re: HTML Forms

2008-10-24 Thread Freddy Andersen
Well where do you want the cancel button to go ? reset the form and back to the new task? or some other page? Just use a link_to or button_to for the cancel button... Don't make it part of the form... --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: recreated app and now it can't load OpenSSL

2008-10-22 Thread Freddy Andersen
is openssl installed? Is this centos? rpm -qa | grep openssl If you get that in irb its not a environment.rb issue --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

[Rails] Re: catch-all routing

2008-10-22 Thread Freddy Andersen
map.static ':permalink', :controller = 'pages', :action = 'show' or map.connect *path, :controller = four_oh_fours First on is not great and you need to handle 404s in that controller... the second is well an example from a 404 controller BUT it shows the *path example... if you do

[Rails] Re: version_fu in Rails 2.1.1

2008-10-21 Thread Freddy Andersen
?? class StatisticsType ActiveRecord::Base version_fu end --~--~-~--~~~---~--~~ 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

[Rails] Re: https problems

2008-10-20 Thread Freddy Andersen
Sorry was away.. Do you have any rails plugins installed? If you try https://yourhost/images/someimage.jpg does that serve the image in https? Is there anything in the rails log about redirect? or maybe the apache logs? --~--~-~--~~~---~--~~ You received this

[Rails] Re: multi-select category listbox

2008-10-19 Thread Freddy Andersen
select_tag “article[category_ids][]“, options_from_collection_for_select(@available_categories, “id”, “name”), :multiple=true That should create a select box with multiple selected elements... --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Question on model and fields in form

2008-10-18 Thread Freddy Andersen
In the model do before_save :concat_phonenumbers def concat_phonenumbers self.phone_number = #{phone_int} + #{phone_area} + #{phone_number} + #{phone_extension} end --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Rails] Re: acts_as_versioned issues

2008-10-17 Thread Freddy Andersen
The acts_as_versioned plugin is not compatible with rails 2.1 as I understand. You should look at version_fu.. http://github.com/jmckible/version_fu/tree/master --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: Generating a random number

2008-10-16 Thread Freddy Andersen
What I did: def self.generate_invoice_id record = Object.new while record random = rand(9) record = find(:first, :conditions = [invoice_id = ?, random]) end return random end Put that in the model and I get a random invoice number when I need it..

[Rails] Re: ruby on rails tweaks

2008-10-15 Thread Freddy Andersen
Or install the thin gem and us that as the development server that can start at boot time. Add a thin.yml in your codes config directory so you can start the server with thin -C config/thin.yml start... You can set the port number and stuff in the config file.

[Rails] Re: How can form data be used to make an XML file?

2008-10-15 Thread Freddy Andersen
Why don't you just save the data to the database and serve it as xml when the xml is needed? This way you can do more than just xml with the data? If that's not an option you can setup a session model that can store the data when it comes back to the controller... Just setup form_tags that has

[Rails] Re: Latency Question

2008-10-14 Thread Freddy Andersen
Just so I understand the test box and your browser is on the same machine? Did you test this from a outside ip too? Your config's look correct. What do you mean by this statement: but it just spawns Mongrel instances, so perhaps Mongrel is the culprit With your config you should have only

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-12 Thread Freddy Andersen
Depends on the rails backed but if you are using mongrel or thin you can setup a prefix for the app... setup a prefix of /app and then in the balancer you use ProxyPass / balancer://cluster/app --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Rails + Apache2 + Balancer Manager - PHP doesn't work

2008-10-11 Thread Freddy Andersen
You are going to have a virtualhost that does not forward all request to your mongrel... If the request is sent to a mongrel you will ne be able to render the php file... SO here are some basics: virtualhost DirectoryIndex index.php DocumentRoot /disk/phpcode alias /railscode/javascripts

[Rails] Re: check for valid email address

2008-10-11 Thread Freddy Andersen
Do you have this user registered at your site with an email address? There is no way to test a existing email with ex. google or other email hosts. (The smtp protocol allows for this but its a spam trap to have this available... ) You do have the ability to test if the domain exists and is a

[Rails] Re: http_authentication

2008-10-10 Thread Freddy Andersen
I'm not sure if there is a bug or not BUT looking at your header information you have Mongrel 0.3.13.4 !? Is that the actual mongrel you are using? This version is 2+ years old.. If that is the Mongrel you should upgrade to the latest and test with that first. (1.1.5) I would also recommend to

[Rails] Re: routes from restful_authentication, wtf?

2008-10-10 Thread Freddy Andersen
That does not look like the routes from restful authentication alone... Looks like there is a role base authentication system added too... If you do all the user editing inside the admin space why not just wrap this in the admin space? map.resources :admin do |admin| admin.resources :users,

[Rails] Re: Simple app - problems w/ routes

2008-10-10 Thread Freddy Andersen
Wow there are just so many issues... First I would highly recommend that you have the same rails version in both environments... Is there a reason why you want 1.2.6 on one machine and 2.1 on a different machine? These versions are very different and I'm sure you will find numerous of issues

[Rails] Re: Tableless models in Rails

2008-10-09 Thread Freddy Andersen
When you say tables do you mean database tables OR html tables ? Here is a good howto on session based model: http://railscasts.com/episodes/119-session-based-model --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Rails] Re: monit newbie problem

2008-10-07 Thread Freddy Andersen
Monit does NOT get the normal path information that a regular user on the server would get so you have to be VERY specific in you configuration files. Some times the best solution is to create a startup script that you call from monit... script: #!/bin/bash # Get the port number PORT=$2 # Set

[Rails] Re: Moving from one dns domain to another

2008-10-07 Thread Freddy Andersen
Hi, If you want the customer to land on a landing page that redirects after 5/10 seconds you should just setup two virtualhosts in apache one for the new domain and one for the old... The old domain has one index.html file inside the doc root which has a META refresh inside. example: html

[Rails] Re: Recent Upgrade to 2.1.0 not working IE7

2008-10-07 Thread Freddy Andersen
IE throwing 500 errors?! What do you have in your rails log? Could you post a stack trace for the 500 error you get. Is this development or production env. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: https problems

2008-10-07 Thread Freddy Andersen
Please post your https virtualhost.. Do you have any .htaccess files anywhere? --~--~-~--~~~---~--~~ 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

[Rails] Re: Multiple Forms One Model

2008-10-01 Thread Freddy Andersen
I would have an orderaddress object that you can split to shipping and billing address that belongs to your order model, like this: belongs_to :billing_address, :class_name = 'OrderAddress', :foreign_key = 'billing_address_id', :dependent = :destroy belongs_to :shipping_address,

<    1   2