rubyonrailsin

A Ruby and Rails talk

Friday, March 19, 2010

Re: [spree-user] Remembering Credit Card info without Storing it in the Database?

by rubyonrailsin 0 comments
Also, alot of this should already be done in spree, but this looks
like a good guide:

http://cookingandcoding.wordpress.com/2010/01/14/using-activemerchant-with-authorize-net-and-authorize-cim/

On Fri, Mar 19, 2010 at 6:37 PM, Christopher Maujean <cmaujean@gmail.com> wrote:
> The basic process (using Authorize.net CIM service) is this:
>
> * User checks out, entering their billing, shipping and credit card
> data in the proper place in your store.
> * A CIM profile and a CIM Payment profile are made for the customer
> (the payment profile containing that credit card and billing address)
> * A transaction is sent, using the customers cim profile id and the
> customers payment profile.
> * The profile and payment profile ids are stored in the store database.
>
> When the customer comes back later, and is ready to checkout again,
> the store retrieves the customer payment profile(s), including the
> last 4 digits of the creditcard, from CIM, and presents that to the
> customer to verify or choose among their current profiles.
>
> --Christopher
>
> On Fri, Mar 19, 2010 at 4:26 PM, viatropos <lancejpollard@gmail.com> wrote:
>> Hey there,
>>
>> I have Spree up and running with PayPal and Check Payment methods,
>> because I've heard about the strict rules and security measures you
>> need to take to process Credit Card Payments directly.  I'm ready to
>> implement Credit Card Processing now.
>>
>> My question is, what are the basic things I need to know to get a
>> business up and running with Credit Card processing in Spree?  I know
>> I need the gateway (using Authorize.net), and a Merchant Account with
>> a bank, and ActiveMerchant.  But I'm not sure how to remember their
>> credit card info for future purchases.
>>
>> More specifically, the end goal would be to have the customer enter
>> their credit card info once, and every time after that when they
>> checkout, they just say "yes, this is the correct credit card, use
>> that one", like how Amazon does it.  Because it's best practice to not
>> store the credit card info on the merchant's server, how do you
>> present the credit card (as say "***********1234") to the customer?  I
>> don't see the connection.  What information are we storing, what
>> information are we getting from the gateway (say Authorize.net), and
>> how do we get that info from the gateway (like the starred out credit
>> card number and their billing info)?
>>
>> I've read the following things, among others:
>>
>> - http://www.activemerchant.org/
>> - http://peepcode.com/products/activemerchant-pdf
>> - http://spreecommerce.com/documentation/checkout.html
>> - http://37signals.com/svn/posts/753-ask-37signals-how-do-you-process-credit-cards
>>
>> But I just don't see the connection.  How do I "remember" my customers
>> credit card without storing it in the database?
>>
>> Just looking for a practical tutorial or blog post about it :).
>> Thanks so much,
>> Lance
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Spree" group.
>> To post to this group, send email to spree-user@googlegroups.com.
>> To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
>>
>>
>

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [Rails] Re: Rails + Mysql

by rubyonrailsin 0 comments
Jose,

Uninstall gem mysql first (sudo gem uninstall mysql) and then install it again with this command:
 $ sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config
for reference:
Check on this link http://wiki.rubyonrails.org/database-support/mysql, maybe it can help.

If it still doesn't work, try to reinstall mysql server.

Good luck,

Yudi Soesanto


2010/3/20 José Luis Romero <tangun73@gmail.com>
*mysql --version
mysql  Ver 14.14 Distrib 5.1.44, for redhat-linux-gnu (i386) using
readline 5.1

*rails -v
Rails 2.3.5


On Mar 19, 4:19 am, Yudi Soesanto <soesa...@gmail.com> wrote:
> Jose,
>
> What rails version and mysql version are you using?
> Do this:
> *rails -v*
> *mysql --version*
>
> I have the same issue as your after I upgraded to rails 2.2.2 and finally, I
> got it work
> What I did, I reinstall mysql and it worked ok now.
>
> Yudi Soesanto
>
> 2010/3/18 José Luis Romero <tangu...@gmail.com>
>
> > On Mar 18, 12:36 am, Conrad Taylor <conra...@gmail.com> wrote:
> > > José, can you verify that MySQL is running by doing the following:
>
> > > $ mysql -u<username>
>
> > Yes it's running...
>
> > --
> > 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+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/rubyonrails-talk?hl=en.

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


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…

Re: [spree-user] Remembering Credit Card info without Storing it in the Database?

by rubyonrailsin 0 comments
The basic process (using Authorize.net CIM service) is this:

* User checks out, entering their billing, shipping and credit card
data in the proper place in your store.
* A CIM profile and a CIM Payment profile are made for the customer
(the payment profile containing that credit card and billing address)
* A transaction is sent, using the customers cim profile id and the
customers payment profile.
* The profile and payment profile ids are stored in the store database.

When the customer comes back later, and is ready to checkout again,
the store retrieves the customer payment profile(s), including the
last 4 digits of the creditcard, from CIM, and presents that to the
customer to verify or choose among their current profiles.

--Christopher

On Fri, Mar 19, 2010 at 4:26 PM, viatropos <lancejpollard@gmail.com> wrote:
> Hey there,
>
> I have Spree up and running with PayPal and Check Payment methods,
> because I've heard about the strict rules and security measures you
> need to take to process Credit Card Payments directly.  I'm ready to
> implement Credit Card Processing now.
>
> My question is, what are the basic things I need to know to get a
> business up and running with Credit Card processing in Spree?  I know
> I need the gateway (using Authorize.net), and a Merchant Account with
> a bank, and ActiveMerchant.  But I'm not sure how to remember their
> credit card info for future purchases.
>
> More specifically, the end goal would be to have the customer enter
> their credit card info once, and every time after that when they
> checkout, they just say "yes, this is the correct credit card, use
> that one", like how Amazon does it.  Because it's best practice to not
> store the credit card info on the merchant's server, how do you
> present the credit card (as say "***********1234") to the customer?  I
> don't see the connection.  What information are we storing, what
> information are we getting from the gateway (say Authorize.net), and
> how do we get that info from the gateway (like the starred out credit
> card number and their billing info)?
>
> I've read the following things, among others:
>
> - http://www.activemerchant.org/
> - http://peepcode.com/products/activemerchant-pdf
> - http://spreecommerce.com/documentation/checkout.html
> - http://37signals.com/svn/posts/753-ask-37signals-how-do-you-process-credit-cards
>
> But I just don't see the connection.  How do I "remember" my customers
> credit card without storing it in the database?
>
> Just looking for a practical tutorial or blog post about it :).
> Thanks so much,
> Lance
>
> --
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To post to this group, send email to spree-user@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

Re: [Radiant-Dev] i18n merged in

by rubyonrailsin 0 comments
where can i find the translations available so far? do they have to be
installed or am i just overlooking them somewhere in the source?

On Wed, Mar 17, 2010 at 2:06 PM, Jim Gay <jim@saturnflyer.com> wrote:
> Development just got slightly more complicated, but much more language friendly.
>
> The i18n branch has been merged with master.
>
> Please be sure, when adding features and fixing bugs that you account for any strings in the locale translation files.
>
> Many thanks to Keith Bingman who got the ball rolling.
> There were no credits in the i18n branch, so if you've contributed code or a translation please reply back and I'll updated the names.
>
>
> Jim Gay
> http://www.saturnflyer.com
>
>
>
>
> --
> Radiant CMS Dev Mailing List
> Post:        radiantcms-dev@googlegroups.com
> Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
> Group Site:  http://groups.google.com/group/radiantcms-dev/

--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/

To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Read More…

[Rails] current_user Authlogic & Service.rb

by rubyonrailsin 0 comments
Hi,

I am using Authlogic & Weborb to remote from as3.

Is it possible to access current_user, which is defined in a helper
method in the application controller, in a Service class.

Thank you in advance,

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

Read More…

[Rails] Re: Rails + Mysql

by rubyonrailsin 0 comments
*mysql --version
mysql Ver 14.14 Distrib 5.1.44, for redhat-linux-gnu (i386) using
readline 5.1

*rails -v
Rails 2.3.5


On Mar 19, 4:19 am, Yudi Soesanto <soesa...@gmail.com> wrote:
> Jose,
>
> What rails version and mysql version are you using?
> Do this:
> *rails -v*
> *mysql --version*
>
> I have the same issue as your after I upgraded to rails 2.2.2 and finally, I
> got it work
> What I did, I reinstall mysql and it worked ok now.
>
> Yudi Soesanto
>
> 2010/3/18 José Luis Romero <tangu...@gmail.com>
>
> > On Mar 18, 12:36 am, Conrad Taylor <conra...@gmail.com> wrote:
> > > José, can you verify that MySQL is running by doing the following:
>
> > > $ mysql -u<username>
>
> > Yes it's running...
>
> > --
> > 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+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/rubyonrails-talk?hl=en.

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

Read More…

Re: [Radiant-Dev] i18n merged in

by rubyonrailsin 0 comments
Is there a guide to updating your extensions to make use of the i18n features?

On Mar 17, 2010, at 3:06 PM, Jim Gay wrote:

> Development just got slightly more complicated, but much more language friendly.
>
> The i18n branch has been merged with master.
>
> Please be sure, when adding features and fixing bugs that you account for any strings in the locale translation files.
>
> Many thanks to Keith Bingman who got the ball rolling.
> There were no credits in the i18n branch, so if you've contributed code or a translation please reply back and I'll updated the names.
>
>
> Jim Gay
> http://www.saturnflyer.com
>
>
>
>
> --
> Radiant CMS Dev Mailing List
> Post: radiantcms-dev@googlegroups.com
> Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
> Group Site: http://groups.google.com/group/radiantcms-dev/

--
Radiant CMS Dev Mailing List
Post: radiantcms-dev@googlegroups.com
Unsubscribe: radiantcms-dev-unsubscribe@googlegroups.com
Group Site: http://groups.google.com/group/radiantcms-dev/

To unsubscribe from this group, send email to radiantcms-dev+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Read More…

[Rails] Re: auto_complete plugin on rails 2.3.5

by rubyonrailsin 0 comments
> Someone can help me?
Just grab it from github and drop it in vendor/plugins, there is no
special install step to run.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
> I prefer to keep one migration per model
It's a bad an unmaintainable idea. I did that when I was a beginner in
RoR.

Simply create migrations to add/remove columns to existing tables. When
you have too many migration files, simply remove them. The whole schema
is saved in schema.rb
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: Envoi de SMS

by rubyonrailsin 0 comments
Fernando Perez wrote:
> Bonjour,
>
> Quelqu'un envoie des sms à partir de son application? Vous avez des
> fournisseurs à conseiller. Le plus simple c'est d'envoyer à partir d'un
> email puis le fournisseur transforme ça en sms.
>
> Niveau tarif ça va du simple au triple apparement.
>
> Merci pour vos suggestions
My bad, this message was intended to the french list.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: Rail Quickstart Guide: Always receiving "template missing" errors.

by rubyonrailsin 0 comments
Thanks for your time. I'm almost sure there is no typo on my part. I'm
actually starting to think there's something wrong with the
environment as I have created small ror apps before without any issues
and am somewhat experiences w/ rails. Having gone through the rails
quickstart guide again, I have the same issue w/ home controller.

home_controller.rb ------
class HomeController < ApplicationController
def index
end
end

routes.rb ---------
ActionController::Routing::Routes.draw do |map|
# The priority is based upon order of creation: first created ->
highest priority.
map.connect 'home/index', :controller => 'home', :action => 'index'

# Sample of regular route:
# map.connect 'products/:id', :controller => 'catalog', :action =>
'view'
# Keep in mind you can assign values other than :controller
and :action

# Sample of named route:
# map.purchase 'products/:id/purchase', :controller =>
'catalog', :action => 'purchase'
# This route can be invoked with purchase_url(:id => product.id)

# Sample resource route (maps HTTP verbs to controller actions
automatically):
# map.resources :products

# Sample resource route with options:
# map.resources :products, :member => { :short => :get, :toggle
=> :post }, :collection => { :sold => :get }

# Sample resource route with sub-resources:
# map.resources :products, :has_many =>
[ :comments, :sales ], :has_one => :seller

# Sample resource route with more complex sub-resources
# map.resources :products do |products|
# products.resources :comments
# products.resources :sales, :collection => { :recent => :get }
# end

# Sample resource route within a namespace:
# map.namespace :admin do |admin|
# # Directs /admin/products/* to Admin::ProductsController (app/
controllers/admin/products_controller.rb)
# admin.resources :products
# end

# You can have the root of your site routed with map.root -- just
remember to delete public/index.html.
# map.root :controller => "welcome"

# See how all your routes lay out with "rake routes"

# Install the default routes as the lowest priority.
# Note: These default routes make all actions in every controller
accessible via GET requests. You should
# consider removing or commenting them out if you're using named
routes and resources.
map.root :controller => "home"
end


index.html.erb ---------
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>

Again, I am following the rails quickstart guide for 2.3 verbatim and
still receiving this error:
"Processing HomeController#index (for 127.0.0.1 at 2010-03-19
15:42:14) [GET]
ActionView::MissingTemplate (Missing template home/index.erb in view
path app/views):
Rendering rescues/layout (internal_server_error)"

Any help greatly appreciated!!!!!!!!
Thanks,
Stone

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

Read More…

[spree-user] Remembering Credit Card info without Storing it in the Database?

by rubyonrailsin 0 comments
Hey there,

I have Spree up and running with PayPal and Check Payment methods,
because I've heard about the strict rules and security measures you
need to take to process Credit Card Payments directly. I'm ready to
implement Credit Card Processing now.

My question is, what are the basic things I need to know to get a
business up and running with Credit Card processing in Spree? I know
I need the gateway (using Authorize.net), and a Merchant Account with
a bank, and ActiveMerchant. But I'm not sure how to remember their
credit card info for future purchases.

More specifically, the end goal would be to have the customer enter
their credit card info once, and every time after that when they
checkout, they just say "yes, this is the correct credit card, use
that one", like how Amazon does it. Because it's best practice to not
store the credit card info on the merchant's server, how do you
present the credit card (as say "***********1234") to the customer? I
don't see the connection. What information are we storing, what
information are we getting from the gateway (say Authorize.net), and
how do we get that info from the gateway (like the starred out credit
card number and their billing info)?

I've read the following things, among others:

- http://www.activemerchant.org/
- http://peepcode.com/products/activemerchant-pdf
- http://spreecommerce.com/documentation/checkout.html
- http://37signals.com/svn/posts/753-ask-37signals-how-do-you-process-credit-cards

But I just don't see the connection. How do I "remember" my customers
credit card without storing it in the database?

Just looking for a practical tutorial or blog post about it :).
Thanks so much,
Lance

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] Envoi de SMS

by rubyonrailsin 0 comments
Bonjour,

Quelqu'un envoie des sms à partir de son application? Vous avez des
fournisseurs à conseiller. Le plus simple c'est d'envoyer à partir d'un
email puis le fournisseur transforme ça en sms.

Niveau tarif ça va du simple au triple apparement.

Merci pour vos suggestions
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
Thanks Jeff. That's a lot to digest, but I will and likely try it,
too.

Grar

On Mar 19, 4:03 pm, Jeff Lewis <jeff.bu...@gmail.com> wrote:
> Hi Grar,
>
> If you really want to call a single migration, you could do something
> like:
>
> $ ./script/console
> ...>> require "#{RAILS_ROOT}/db/migrate/100_create_foos.rb"
>
> => ["CreateFoos"]
>
> >> CreateFoos.down
>
> ==  CreateFoos: reverting =============================
> -- drop_table(:foos)
> ...
>
> >> ActiveRecord::Base.connection.tables.include?('foos')
>
> => false
>
> >> CreateFoos.up
>
> ==  CreateFoos: migrating =============================
> -- create_table(:foos)
> ...
>
> >> ActiveRecord::Base.connection.tables.include?('foos')
>
> => true
>
> And/or roll such calls into a runnable script and run it via runner:
>
> $ cat ./script/migrate_foo.runnable
> require "#{RAILS_ROOT}/db/migrate/100_create_foos.rb"
> CreateFoos.down
> CreateFoos.up
>
> $ ./script/runner ./script/migrate_foo.runnable
> ...
>
> Personally, I like to keep my migrations intact as well, one per
> persistable model ob, unless I'm working on a project with a team that
> doesn't.  This way it's easy for devs to see exactly what's defined at
> that time in the db for a given model ob, without having to weed
> through all the various modifying migrations related to some model ob,
> or looking for such info in the development_structure.sql if
> available, or having to fire up the console or an underlying db qry
> tool to see that model ob's current db schema.
>
> For all my projects, I usually dev a runnable re-init script that
> contains all of the work (that I would typically call by hand)
> required to put the env in the current valid working state: run
> migrations, load any init data as required for the env, perform any
> post-init processing of data, run tests, etc.
>
> Whenever a new migration is added or an existing one is modified or
> init data is added/modified, I just make one call to re-init the dev
> env.  Note that the same holds true for pulling and re-init'ing some
> version from svn/git/....
>
> When it comes to upgrading the production env for a new release that
> requires db-related changes, I dev a runnable script per prod env
> upgrade that performs the necessary work to upgrade the prod env to be
> in line with that particular release: run pre-upgrade tests to see if
> upgrade can/should be performed, run specific migrations and/or db
> schema mods as applicable, load any data and/or perform any data
> updates, run post-upgrade tests, etc.
>
> Whenever a prod env upgrade needs to be performed, I dump the prod env
> db as a pre-upgrade backup, run the upgrade script to pre-test the
> prod env, upgrade the prod env, and post-test the prod env, and when
> all is good, dump the db again as a post-upgrade backup.  (I usually
> test each upgrade scripts against a similar version/state of the dev
> env prior to performing the upgrade on the prod env, and once the
> script's working as intended, then I just re-init the current dev
> env.)  Having such prod env upgrade scripts (and related db dumps)
> makes it equally easy to revert back to a specific state of the prod
> env as well.
>
> Jeff
>
> On Mar 19, 11:22 am, Grary <grary.sti...@gmail.com> wrote:
>
> > Yes, I've certainly given the role of seed data due consideration in
> > another context, but it's not relevant in the case at hand, I don't
> > think. In that case at hand, the large data set I seek to include in
> > my development is used for autocompletion and by business logic on the
> > model side.
>
> > Thanks,
>
> > Grar
>
> > On Mar 19, 1:50 pm, Colin Law <clan...@googlemail.com> wrote:
>
> > > On 19 March 2010 16:07, Grary <grary.sti...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > I prefer to keep one migration per model, but lately I'm adding data
> > > > that's expensive to drop every time I change my models.
>
> > > It is considered a bad idea to seed data using migrations, if that is
> > > what you are doing.  Google for rails migration seed for many
> > > discussions on this issue, including on this list.  Perhaps this is
> > > your fundamental problem.
>
> > > Colin
>
> > > > How do I db:drop and db:migrate only selected tables/files? Basically,
> > > > I want to ignore certain tables and migrations altogether during
> > > > certain development phases.
>
> > > > Thanks,
>
> > > > Grar
>
> > > > --
> > > > 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+unsubscribe@googlegroups.com.
> > > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.

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

Read More…

[Rails] Re: "no such file to load -- sqlite3" Rails

by rubyonrailsin 0 comments
Robert Huberdeau wrote:
> Ehtsham Abbas wrote:
>> M. Figueiroa wrote:
>>> In my case I just downloaded the sqllite3.dll from the
>>> http://www.sqlite.org/download.html (This is a DLL of the SQLite library
>>> without the TCL bindings. The only external dependency is MSVCRT.DLL.)
>>> and then copied it to the Windows\System32 folder. It worked.
>>
>>
>> MY PROBLEM HAS BEEN RESOLVED ITS WORKING NOW.... im so very thankful to
>> you Figueiro
>
> For some reason this doesn't work for me. I moved the dll file into my
> Windows\System32 folder and I get the same error.


try downloading the precompiled files from:
http://www.sqlite.org/download.html

in windows you will need the
sqlite3.def, sqlite3.dll, sqlite3.exe.
Save this files to the Ruby/bin directory,
then use the 'gem install sqlite3-ruby'
(you may get some definition error messages about the documentation but
it shoud work anyways)
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Preparing an Asynchronous Response with ActionController

by rubyonrailsin 0 comments
Hello,

I was wondering if there's an easy way to make ActionController render a
response in an asynchronous background process.

I have a large object graph which takes over a minute to serialize in
amf:

render :amf => myData

I'd like to render() the amf serialization in a workling process and
store the results in memcache key'd by original msg-id so the client can
get the serialized result in a subsequent request.

Is there a simple way to perform the render() operation outside the
context of the controller? Something like:

MyController.new.render({:amf=>myData})

(of course, render() is a protected method, so I can't do that. And I'm
also not sure where to obtain the serialized result since render() is
void).


Thanks,

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

Read More…

Re: [spree-user] sagepay which is the best way to integrate

by rubyonrailsin 0 comments
Quick answer: you can get SagePay Direct working quite quickly if you don't need 3D Secure. You do this by using the module provided with active merchant.

Spree's protx support probably needs updating - I've not checked recently. I have an extension on github [1] which did work with 3D secure, but it needs quite a bit of updating now. The Active Merchant people were looking at better support for 3D Secure, though I think it's still work in progress.

I have no experience of the Server/Forms flavours, and have not heard of other people using these with Spree.

Paul

[1] http://github.com/paulcc/spree-protx3ds-gateway


On Fri, Mar 19, 2010 at 12:01 PM, lostcaggy <martin@domeweb.co.uk> wrote:
I'm using version 0.9.3 of spree, the project I'm working on has been
on hold for quite a while, but customer now wishes to sign up with
sagepay(protx). The site is on a webbynode VPS. Which version of
sagepay would be easiest to use and quickest to set up; least
customisation of spree, as now customer is very insistent that
everything gets set up as soon as possible. The versions sagepay
offers are form, server and direct. Does anyone have recent experience
of setting this up and would perhaps be willing to share some of their
code or point me in the right direction to do this, Spree seems to
offer a gateway for protx but which type of access is this for.
thanks
Martin

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.


--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
Read More…

[Rails] I18n and Rails 2.3.5

by rubyonrailsin 0 comments
Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I call the t function, it works fine, but for some keys, it does not work and I have no clue why it is going on.

I do have a .yml with correct keys and values. For example, in this (http://dev.promine.com.br/promine) page, i18n is working properly, but in this (http://dev.promine.com.br/servicos) one, it isn't? Any suggestion about what is happening? Thanks in advance.

Rodrigo Felix

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Read More…

[Rails] Re: How can I consume SOAP Web Service?

by rubyonrailsin 0 comments
Frederick Cheung wrote:
> On Mar 19, 8:59�pm, Robert Walker <li...@ruby-forum.com> wrote:
>> Rails, and I don't know if it's being moved forward to Rails 3.
> If you're just making soap requests you don't need actionwebservice -
> I've used the soap libraries that ship as part of the ruby standard
> libraries

Excellent point. 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: convert app to production

by rubyonrailsin 0 comments
John Wu wrote:
> How to change rails 2.3.5 app to production? I couldn't find
> ENV["RAILS_ENV"] under config/environment.rb

That's been gone from config/environment.rb for quite a while now. It
was never really the "proper" way to setup the environment anyway AFAIK.

What you'll want to do is setup your production server to default to
production mode.

For information on how to do this using Phusion Passenger see:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#rails_env

If you just want to run in production mode on your local box you can
start script/server in production mode with:

./script/server -e production

See...
./script/server --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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
Since I started using tools (like prince/wkhtmltopdf) to generate pdfs
from html/css for web app projects that need to gen pdfs, I've never
gone back to using low-level pdf-gen'ing libs/tools (like prawn).
Just requires so much less work.

By the way, you may also want to look into using http://www.accesspdf.com/pdftk/
in combination with wkhtmltopdf(/prince) in case you need to do any
post-processing of your gen'd pdfs (adding additional watermarks,
splitting out pdf pages, combining pdfs, ....).

Jeff

On Mar 19, 1:45 pm, Fritz Trapper <li...@ruby-forum.com> wrote:
> Prawn seems to need a fixed number of columns in tables, so I'll take a
> look on wkhtmltopdf.
> --
> 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: How can I consume SOAP Web Service?

by rubyonrailsin 0 comments
On Mar 19, 8:59 pm, Robert Walker <li...@ruby-forum.com> wrote:
> Jorge alejandro Mendoza torres wrote:
>
> > Please, I need to know the way to consume SOAP Web Service. I've seen
> > some examples but I don't understand how I can do it.
>
> This is the only project I'm aware of still supporting SOAP in Rails:
>
> http://github.com/datanoise/actionwebservice
>
> I don't have any idea if it's all still working in the latest version of
> Rails, and I don't know if it's being moved forward to Rails 3.

If you're just making soap requests you don't need actionwebservice -
I've used the soap libraries that ship as part of the ruby standard
libraries

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

Read More…

[Rails] Re: How can I consume SOAP Web Service?

by rubyonrailsin 0 comments
Jorge alejandro Mendoza torres wrote:
> Please, I need to know the way to consume SOAP Web Service. I've seen
> some examples but I don't understand how I can do it.
>

This is the only project I'm aware of still supporting SOAP in Rails:

http://github.com/datanoise/actionwebservice

I don't have any idea if it's all still working in the latest version of
Rails, and I don't know if it's being moved forward to Rails 3.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: Re: How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
Prawn seems to need a fixed number of columns in tables, so I'll take a
look on wkhtmltopdf.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: getting data from a through table

by rubyonrailsin 0 comments
thanks for the suggestions

attributes is a self inherited table
so i need to get them i order of top level and down
this is part of my current solution

has_many :objects_attributes do
def top_level
all(:joins => :attribute, :conditions => "attributes.parent_id
is null")
end

def children(id)
all(:joins => :attribute, :conditions => ["attributes.parent_id
= ?", id])
end
end

this allows me to access all fields in order desired
thanks for your 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
You might want to check out:

http://code.google.com/p/wkhtmltopdf/
http://www.princexml.com/

wkhtmltopdf is free. prince will cost you. prince has better css
print-related implementation coverage at this time, but wkhtmltopdf
can be a very good alternative depending on the needs of your project.

Jeff

On Mar 19, 12:54 pm, Fritz Trapper <li...@ruby-forum.com> wrote:
> Philip Hallstrom wrote:
> > render_to_string
>
> >http://api.rubyonrails.org/classes/ActionController/Base.html#M000659
>
> > That puts it into a local variable anyway... if you can then pass that
> > to htmldoc you're on your way.  Not sure how this might affect any
> > paths to CSS/images for HTMLDOC though.
>
> Thanks. CSS is "no problem" with HTMLDOC - it doesn't support it ;-)
>
> Maybe, I need to find some alternative for HTMLDOC. My problem is, that
> I have a table with variable number of columns.
> --
> 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

Re: [spree-user] Re: VAT (remodelling?)

by rubyonrailsin 0 comments
Roughly speaking VAT in the UK requires "full disclosure", ie you need
to state the VAT rate that applies to *each line item* and break out the
VAT from the grand-total at the bottom of the invoice.

There are some special cases worth being aware of:

- If you are converting currency then in the UK the VAT is calculated
using a prescribed rate that is given in advance, ie it will not be a
straightforward X% of either the unconverted or the converted figure

- For business to business across the euro-zone you usually zero rate
the transaction, but you need to declare these transactions *completely*
at the end of the quarter. So you need to present a complete list of
all business to business transactions, net amount and the VAT number of
the other business. This is hotting up and we now need to present it
within days of the end of the quarter and shortly it may be required to
present this *monthly* once you hit a certain turnover - this is quite
an onerous proposition without support from the software...

- Other than that VAT is fairly straightforward in most of Europe. It
can be summarised (for physical goods) as: if you ship around the
eurozone then you charge VAT, if you ship outside then you don't. There
are some exceptions such as business to business, but that probably
covers the majority of transactions.

Just some thoughts

Ed W

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] convert app to production

by rubyonrailsin 0 comments
Hi,

How to change rails 2.3.5 app to production? I couldn't find
ENV["RAILS_ENV"] under config/environment.rb

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

Read More…

[Rails] How can I consume SOAP Web Service?

by rubyonrailsin 0 comments
Please, I need to know the way to consume SOAP Web Service. I've seen
some examples but I don't understand how I can do it.

From the client side, I need to save the information into database.

Please, somebody answer.

I need your help.

Thanks and greetings.

Jorge Mendoza
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
Hi Grar,

If you really want to call a single migration, you could do something
like:

$ ./script/console
...
>> require "#{RAILS_ROOT}/db/migrate/100_create_foos.rb"
=> ["CreateFoos"]

>> CreateFoos.down
== CreateFoos: reverting =============================
-- drop_table(:foos)
...

>> ActiveRecord::Base.connection.tables.include?('foos')
=> false

>> CreateFoos.up
== CreateFoos: migrating =============================
-- create_table(:foos)
...

>> ActiveRecord::Base.connection.tables.include?('foos')
=> true

And/or roll such calls into a runnable script and run it via runner:

$ cat ./script/migrate_foo.runnable
require "#{RAILS_ROOT}/db/migrate/100_create_foos.rb"
CreateFoos.down
CreateFoos.up

$ ./script/runner ./script/migrate_foo.runnable
...

Personally, I like to keep my migrations intact as well, one per
persistable model ob, unless I'm working on a project with a team that
doesn't. This way it's easy for devs to see exactly what's defined at
that time in the db for a given model ob, without having to weed
through all the various modifying migrations related to some model ob,
or looking for such info in the development_structure.sql if
available, or having to fire up the console or an underlying db qry
tool to see that model ob's current db schema.

For all my projects, I usually dev a runnable re-init script that
contains all of the work (that I would typically call by hand)
required to put the env in the current valid working state: run
migrations, load any init data as required for the env, perform any
post-init processing of data, run tests, etc.

Whenever a new migration is added or an existing one is modified or
init data is added/modified, I just make one call to re-init the dev
env. Note that the same holds true for pulling and re-init'ing some
version from svn/git/....

When it comes to upgrading the production env for a new release that
requires db-related changes, I dev a runnable script per prod env
upgrade that performs the necessary work to upgrade the prod env to be
in line with that particular release: run pre-upgrade tests to see if
upgrade can/should be performed, run specific migrations and/or db
schema mods as applicable, load any data and/or perform any data
updates, run post-upgrade tests, etc.

Whenever a prod env upgrade needs to be performed, I dump the prod env
db as a pre-upgrade backup, run the upgrade script to pre-test the
prod env, upgrade the prod env, and post-test the prod env, and when
all is good, dump the db again as a post-upgrade backup. (I usually
test each upgrade scripts against a similar version/state of the dev
env prior to performing the upgrade on the prod env, and once the
script's working as intended, then I just re-init the current dev
env.) Having such prod env upgrade scripts (and related db dumps)
makes it equally easy to revert back to a specific state of the prod
env as well.

Jeff

On Mar 19, 11:22 am, Grary <grary.sti...@gmail.com> wrote:
> Yes, I've certainly given the role of seed data due consideration in
> another context, but it's not relevant in the case at hand, I don't
> think. In that case at hand, the large data set I seek to include in
> my development is used for autocompletion and by business logic on the
> model side.
>
> Thanks,
>
> Grar
>
> On Mar 19, 1:50 pm, Colin Law <clan...@googlemail.com> wrote:
>
>
>
> > On 19 March 2010 16:07, Grary <grary.sti...@gmail.com> wrote:
>
> > > Hi,
>
> > > I prefer to keep one migration per model, but lately I'm adding data
> > > that's expensive to drop every time I change my models.
>
> > It is considered a bad idea to seed data using migrations, if that is
> > what you are doing.  Google for rails migration seed for many
> > discussions on this issue, including on this list.  Perhaps this is
> > your fundamental problem.
>
> > Colin
>
> > > How do I db:drop and db:migrate only selected tables/files? Basically,
> > > I want to ignore certain tables and migrations altogether during
> > > certain development phases.
>
> > > Thanks,
>
> > > Grar
>
> > > --
> > > 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+unsubscribe@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.

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

Read More…

Re: [Rails] Re: How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
>> render_to_string
>>
>> http://api.rubyonrails.org/classes/ActionController/Base.html#M000659
>>
>> That puts it into a local variable anyway... if you can then pass
>> that
>> to htmldoc you're on your way. Not sure how this might affect any
>> paths to CSS/images for HTMLDOC though.
>
> Thanks. CSS is "no problem" with HTMLDOC - it doesn't support it ;-)
>
> Maybe, I need to find some alternative for HTMLDOC. My problem is,
> that
> I have a table with variable number of columns.

Prawn. http://railscasts.com/episodes/153-pdfs-with-prawn

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

Read More…

[Rails] Re: How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
Philip Hallstrom wrote:
> render_to_string
>
> http://api.rubyonrails.org/classes/ActionController/Base.html#M000659
>
> That puts it into a local variable anyway... if you can then pass that
> to htmldoc you're on your way. Not sure how this might affect any
> paths to CSS/images for HTMLDOC though.

Thanks. CSS is "no problem" with HTMLDOC - it doesn't support it ;-)

Maybe, I need to find some alternative for HTMLDOC. My problem is, that
I have a table with variable number of columns.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

Re: [Rails] Ruby on Rails tutorials for beginners are available here

by rubyonrailsin 0 comments
Good work!

Thanks!

Max-B

Il giorno ven, 19/03/2010 alle 08.52 -0700, pankaj ha scritto:
> Hello Everyone,
> I have started my blog at http://railsguru.org.
> Besides other stuff on Rails, the main focus of the site will be to
> help beginners to learn Ruby and Rails and build the fundamentals.
>
> Regards,
> Pankaj Bhageria,
> Tech Lead, Sumeru Software Solutions.
> http://www.railsguru.org
> http://www.sumeru.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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

Re: [Rails] How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
On Mar 19, 2010, at 11:43 AM, Fritz Trapper wrote:

> My show view of a data form is finished and now I want to give a
> possibility to download this view as a pdf file.
>
> I would like to use HTMLDOC to convert the html text to pdf. My idea:
> save the html text to a temporary folder and run HTMLDOC.
>
> But how can I save the html text to a file?

render_to_string

http://api.rubyonrails.org/classes/ActionController/Base.html#M000659

That puts it into a local variable anyway... if you can then pass that
to htmldoc you're on your way. Not sure how this might affect any
paths to CSS/images for HTMLDOC though.


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

Read More…

[spree-user] Ship an order - Move from Pending to Shipped

by rubyonrailsin 0 comments
Hi!

I've been working for a while with Spree and today I decided to try
the new edge version. I cloned the git repository and typed the rake
db:bootstrap command. After initializing the database with some sample
data, I wanted to know how to move an order from Pending to Shipped,
but I couldn't figure out a way to do it. Is there something I am
missing?

Thanks

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Read More…

[Rails] Re: Rails development processes running very slow

by rubyonrailsin 0 comments
Either way it's slow. with the bundle locked or not.

On Mar 19, 8:27 am, Aldric Giacomoni <li...@ruby-forum.com> wrote:
> ChrisT wrote:
>
> > My Gemfile:
> >  source 'http://gemcutter.org'
> >  source 'http://gems.github.com'
> > gem "gemcutter", "0.4.1"
>
> > # Rails3 beta
> > gem "rails", "3.0.0.beta"
>
> > # ActiveRecord requires a database adapter.
> > gem "ruby-mysql"
>
> > # Gems required for the AftershockHarness
> > gem "watir", "1.6.5"
> > gem "firewatir", "1.6.5"
>
> Okay.. Did you do 'bundler lock' ?
> (I am shooting blind here, I'm confused by the problem, but sometimes
> it's like playing broadsides.. start shooting and it starts making
> sense!).
>
> --
> 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] How to save rails generated pages to a file on the server

by rubyonrailsin 0 comments
My show view of a data form is finished and now I want to give a
possibility to download this view as a pdf file.

I would like to use HTMLDOC to convert the html text to pdf. My idea:
save the html text to a temporary folder and run HTMLDOC.

But how can I save the html text to a 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
Yes, I've certainly given the role of seed data due consideration in
another context, but it's not relevant in the case at hand, I don't
think. In that case at hand, the large data set I seek to include in
my development is used for autocompletion and by business logic on the
model side.

Thanks,

Grar

On Mar 19, 1:50 pm, Colin Law <clan...@googlemail.com> wrote:
> On 19 March 2010 16:07, Grary <grary.sti...@gmail.com> wrote:
>
> > Hi,
>
> > I prefer to keep one migration per model, but lately I'm adding data
> > that's expensive to drop every time I change my models.
>
> It is considered a bad idea to seed data using migrations, if that is
> what you are doing.  Google for rails migration seed for many
> discussions on this issue, including on this list.  Perhaps this is
> your fundamental problem.
>
> Colin
>
>
>
> > How do I db:drop and db:migrate only selected tables/files? Basically,
> > I want to ignore certain tables and migrations altogether during
> > certain development phases.
>
> > Thanks,
>
> > Grar
>
> > --
> > 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+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.

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

Read More…

Re: [Rails] selective migrations possible?

by rubyonrailsin 0 comments
On 19 March 2010 16:07, Grary <grary.stimon@gmail.com> wrote:
> Hi,
>
> I prefer to keep one migration per model, but lately I'm adding data
> that's expensive to drop every time I change my models.

It is considered a bad idea to seed data using migrations, if that is
what you are doing. Google for rails migration seed for many
discussions on this issue, including on this list. Perhaps this is
your fundamental problem.

Colin

>
> How do I db:drop and db:migrate only selected tables/files? Basically,
> I want to ignore certain tables and migrations altogether during
> certain development phases.
>
> Thanks,
>
> Grar
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

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

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
I've registered your skepticism.

Yes, I can't see that the benefit of satisfying my preference here
outweighs the burden.

That said, I still think it's a drag to sift through multiple
migration files.

Thanks,

Grar

On Mar 19, 12:40 pm, Ar Chron <li...@ruby-forum.com> wrote:
> Grary wrote:
> > Hi,
>
> > I prefer to keep one migration per model, but lately I'm adding data
> > that's expensive to drop every time I change my models.
>
> So don't do that.  You've chosen to fight a (very) hard battle if that's
> the manner in which you are trying to use migrations.
>
> Down the road, when you want to add a column to a table that has 100,000
> rows of data, you're going through a backup and restore for that table
> just so you can have a single migration file per table???
>
> If it really is just a preference, as opposed to a hard-driven
> requirement, then embrace the multiple migrations convention.
>
>
>
> > How do I db:drop and db:migrate only selected tables/files? Basically,
> > I want to ignore certain tables and migrations altogether during
> > certain development phases.
>
> The weasely approach would be to leave all the migration files in place,
> and edit the contents of the migration files before you do any
> migrations, up or down.  If you don't want to perform a step, comment
> out all the business logic inside that migration file, leaving just a
> self.up (or self.down) that does nothing.  Sounds like a royal PITA to
> me.
>
> --
> 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Regarding template installation and working.

by rubyonrailsin 0 comments
Hi All,

I have recently started working on Ruby on Rails and I am amazed with
the features it gives. I want to know how are templates installed on
Rails for web applications that we develop and also where are the
templates available.

Please help me out.

Regards,
Kamalesh

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

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
OK.

Also, I was just thinking: if I create models and then, without a
migration, create corresponding tables, I have sidestepped the
problem, such as it is.

Anyway, I've registered your skepticism.

Thanks,

Grar

On Mar 19, 12:40 pm, Ar Chron <li...@ruby-forum.com> wrote:
> Grary wrote:
> > Hi,
>
> > I prefer to keep one migration per model, but lately I'm adding data
> > that's expensive to drop every time I change my models.
>
> So don't do that.  You've chosen to fight a (very) hard battle if that's
> the manner in which you are trying to use migrations.
>
> Down the road, when you want to add a column to a table that has 100,000
> rows of data, you're going through a backup and restore for that table
> just so you can have a single migration file per table???
>
> If it really is just a preference, as opposed to a hard-driven
> requirement, then embrace the multiple migrations convention.
>
>
>
> > How do I db:drop and db:migrate only selected tables/files? Basically,
> > I want to ignore certain tables and migrations altogether during
> > certain development phases.
>
> The weasely approach would be to leave all the migration files in place,
> and edit the contents of the migration files before you do any
> migrations, up or down.  If you don't want to perform a step, comment
> out all the business logic inside that migration file, leaving just a
> self.up (or self.down) that does nothing.  Sounds like a royal PITA to
> me.
>
> --
> 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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] auto_complete plugin on rails 2.3.5

by rubyonrailsin 0 comments
Hi, this is my first post.

I have run:

$ ruby script/plugin -v install auto_complete

but the result is:

Plugin not found: ["auto_complete"]
#<Errno::ENOENT: No such file or directory - /dev/null>

I have also try to run:

$ ruby script/plugin -v list

and the result is:

Discovering plugins in http://dev.rubyonrails.com/svn/rails/plugins/
/CHANGELOG
/account_location/
/acts_as_list/
/acts_as_nested_set/
/acts_as_tree/
/atom_feed_helper/
/auto_complete/
/continuous_builder/
[...]

So, the auto_complete is there but it won't install.


Someone can help me?

Thanks.

Guido

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

Read More…

[Rails] Re: selective migrations possible?

by rubyonrailsin 0 comments
Grary wrote:
> Hi,
>
> I prefer to keep one migration per model, but lately I'm adding data
> that's expensive to drop every time I change my models.

So don't do that. You've chosen to fight a (very) hard battle if that's
the manner in which you are trying to use migrations.

Down the road, when you want to add a column to a table that has 100,000
rows of data, you're going through a backup and restore for that table
just so you can have a single migration file per table???

If it really is just a preference, as opposed to a hard-driven
requirement, then embrace the multiple migrations convention.

>
> How do I db:drop and db:migrate only selected tables/files? Basically,
> I want to ignore certain tables and migrations altogether during
> certain development phases.
>

The weasely approach would be to leave all the migration files in place,
and edit the contents of the migration files before you do any
migrations, up or down. If you don't want to perform a step, comment
out all the business logic inside that migration file, leaving just a
self.up (or self.down) that does nothing. Sounds like a royal PITA to
me.

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

Read More…

[Rails] Re: Deprecations

by rubyonrailsin 0 comments
Thanks for the link. A good use of ack-grep on the rails gems:
rails-2.0.5
actionmailer-2.0.5
actionpack-2.0.5
activerecord-2.0.5
activeresource-2.0.5
activesupport-2.0.5

gave me what I was looking for.

B.

On Mar 10, 10:21 pm, Taywin <tboon...@gmu.edu> wrote:
> Not sure if you are looking for. Maybe the link below would be a bit
> of help.
>
> http://mentalized.net/journal/2007/03/13/rails_20_deprecations/
>
> On Mar 9, 3:42 am, Benoit Caccinolo <benoit.caccin...@gmail.com>
> wrote:
>
> > Hi all,
>
> > Is there a way to have a list of all deprecated methods or classes in
> > each new versions of Rails? I know that a warning is logged sometimes,
> > but I would like a proper list to analyze the deprecated parts of my
> > code before running it.
>
> > Thanks,
> > Benoit Caccinolo

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

Read More…

[Rails] selective migrations possible?

by rubyonrailsin 0 comments
Hi,

I prefer to keep one migration per model, but lately I'm adding data
that's expensive to drop every time I change my models.

How do I db:drop and db:migrate only selected tables/files? Basically,
I want to ignore certain tables and migrations altogether during
certain development phases.

Thanks,

Grar

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

Read More…

[Rails] Ruby on Rails tutorials for beginners are available here

by rubyonrailsin 0 comments
Hello Everyone,
I have started my blog at http://railsguru.org.
Besides other stuff on Rails, the main focus of the site will be to
help beginners to learn Ruby and Rails and build the fundamentals.

Regards,
Pankaj Bhageria,
Tech Lead, Sumeru Software Solutions.
http://www.railsguru.org
http://www.sumeru.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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: Problem about "each" in rails

by rubyonrailsin 0 comments
Grick Zh wrote:
> Adam Stegman wrote:
>> Or more concisely (because it's fun):
>> <%=h @posts.map(&:name).to_sentence %>
>> which will make it "Tom, Dick, and Harry".
>

1) @posts.map
This will return a new enumerable, replacing each element of @posts with
whatever the block says
2) &:name
Shortcut to indicate a block and a method. In this case, the method is
:name (post.name)

Other example: [1,2,3,4].inject(:+) # Sum every element of the array.
Will of course fail if an element does not understand "+".

3) to_sentence
We now have an array with names. "to_sentence" is, I believe, an
activesupport method which joins the array into a string with commas,
and adds "and " between the second to last and last item.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

[Rails] Re: Problem about "each" in rails

by rubyonrailsin 0 comments
Adam Stegman wrote:
> Or more concisely (because it's fun):
> <%=h @posts.map(&:name).to_sentence %>
> which will make it "Tom, Dick, and Harry".

I'm newbie,can't understand "(&:name)",but i know this code is skillful.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Read More…

Re: [Rails] Re: undefined method error despite the fact it doesn't exist

by rubyonrailsin 0 comments
On 19 March 2010 14:43, John Merlino <lists@ruby-forum.com> wrote:
> Billee D. wrote:
>> Hi John,
>> I would check your source code in app/views/resources/index.html.haml
>> (or a view helper for that view) for a typo since it's looking for a
>> method named something similar to what you have (e.g change
>> "render_index_row_action_pprove" to "render_index_row_action_approve")
>>
>> HTH
>
>
>
> I run the command find . -print | awk '{print "\""$0"\""}' | grep -v
> \.svn | xargs grep -i "render_index_row_action_pprove"
>
> and this is what I get:
>
> trunk/log/development.log:ActionView::TemplateError (undefined method
> `render_index_row_action_pprove' for #<ActionView::Base:0x10c5ca938>) on
> line #20 of app/views/resources/index.html.haml:
>
> So the only place the method appears is in the development log. When
> someone else downloaded a local copy from the repository, they got no
> such error. So either a modification needs to be made in the development
> log or there's nothing else it appears I can do. Thanks for the

Usually when I get an error shown in a haml file then somewhere (in
log or server window maybe) there will be a full trace which may
identify a line in a helper causing the problem. I wonder if it some
unprintable character is causing the problem so your search does not
find it.

I presume you have checked that you have no locally modified files.
Also check that you have not got any extra files (backup files for
example) in views/resources or helper folders. Rails has been known
to pick up backup files instead of the correct file.

What happens if you check out a new local copy from the repository?

Colin

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

Read More…

Subscribe feeds via e-mail

Blog Archive