Re: [Rails] Re: Re: accidentally created a rails app in the home folder

2013-06-03 Thread Colin Law
On 4 June 2013 07:24, mark ronay wrote: > just an update/follow up. I can successfully run rails and get a rails > server going on my localhost. However, my paths remain totally messed up > and I dont know why. I get the error I originally posted about anywhere > I go (and I am completely certain

[Rails] Re: Re: accidentally created a rails app in the home folder

2013-06-03 Thread mark ronay
just an update/follow up. I can successfully run rails and get a rails server going on my localhost. However, my paths remain totally messed up and I dont know why. I get the error I originally posted about anywhere I go (and I am completely certain I am not inside a path that already has a rai

[Rails] Nokogiri::XML methods example

2013-06-03 Thread Love U Ruby
Hi, I am not able to find out a simple example to find out the how the method works: > Nokogiri::XML::EntityReference::new (http://nokogiri.org/Nokogiri/XML/EntityReference.html#method-c-new) > Nokogiri::XML::Document#canonicalize (http://nokogiri.org/Nokogiri/XML/Document.html#method-i-canonic

Re: [Rails] How to restart AR transaction?

2013-06-03 Thread Ken Ip
Thanks for the reply, Scott. Can you show me how? I've tried per this but it still doesn't work. self.transaction do bar = create(params) rescue nil raise ActiveRecord::Rollback unless bar end unless bar self.transaction do

[Rails] Re: Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Alphonse 23
Okay, I tried that. I uninstalled all previous version of ruby with rvm. Now the only version of ruby on my machine is 2.0: sean@ubuntu:~/ruby$ rvm list rvm rubies =* ruby-2.0.0-p0 [ i686 ] # => - current # =* - current && default # * - default sean@ubuntu:~/ruby$ But, it's still not working

[Rails] Re: Re: Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Rick
"Also, when I type in `which ruby` it freezes the console. " I think whatever ruby you think you're running is damaged. Based on the rails output about needing 2.0 but having 1.8.7 I guessing you'ld be well served by uninstalling 2.0 and redoing the install. How about if you type "ruby --vers

[Rails] Re: inverse_of and #save called multiple times

2013-06-03 Thread Rick
might be worth spending some time to see if you can figure out where the extra "Here" comes from. i didn't check the log to see if there was actually a redundant save of the record. could be an opportunity for you to plumb the mysteries of testing. think of what it did for heisenberg. On Mon

[Rails] Re: Re: Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Alphonse 23
sean@ubuntu:~/ruby/things_i_bought$ echo $PATH /home/sean/.rvm/gems/ruby-2.0.0-p0/bin:/home/sean/.rvm/gems/ruby-2.0.0-p0@global/bin:/home/sean/.rvm/rubies/ruby-2.0.0-p0/bin:/home/sean/.rvm/bin:/home/sean/sbt/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/

Re: [Rails] Re: Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Norbert Melzer
Hmmm… I don't see any output of `which ruby`, probably missordered PATH-variable? Please check. HTH Norbert 2013/6/3 Alphonse 23 > Colin Law wrote in post #099: > > On 2 June 2013 22:20, Alphonse 23 wrote: > >> What am I doing wrong?? > >> > >> @ubuntu:~/ruby/things_i_bought$ rake db

[Rails] Re: Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Alphonse 23
Colin Law wrote in post #099: > On 2 June 2013 22:20, Alphonse 23 wrote: >> What am I doing wrong?? >> >> @ubuntu:~/ruby/things_i_bought$ rake db:migrate >> >> Rails 4 prefers to run on Ruby 2.0. >> >> You're running >> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] > >

[Rails] Anyone using Rails GPG/PGP Encrypted emails with or without Devise?

2013-06-03 Thread Philip Rhoades
People, As the subject says . . Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving

[Rails] My alternative to the DCI principle

2013-06-03 Thread Guirec Corbel
Hello, In the DCI principle, I like the Roles. It enable to have a skinny model with a single responsability (the persistence of the data). I don't like the context. It can be useful for some specific cases like in this article : http://mikepackdev.com/blog_posts/24-the-right-way-to-code-dci-in-r

Re: [Rails] please give some tutorial about Testing in Rails with Rspec and TDD

2013-06-03 Thread Colin Law
On 3 June 2013 16:32, haxuan lac wrote: > Hi > I'm doing with Test in Rails with Rspec and TDD > I try to search some Link in Internet but I want somebody can give me > instruction about Rspec and TDD. railstutorial.org (which is free to use online) uses rspec and tdd I believe. Colin > Thanks.

Re: [Rails] please give some tutorial about Testing in Rails with Rspec and TDD

2013-06-03 Thread John Davalos
I found this to be pretty helpful. http://everydayrails.com/2012/03/12/testing-series-intro.html On Mon, Jun 3, 2013 at 8:40 AM, Dave Aronson < googlegroups2d...@davearonson.com> wrote: > On Mon, Jun 3, 2013 at 11:32 AM, haxuan lac wrote: > > > I try to search some Link in Internet but I want

Re: [Rails] How about add a method to truncate a long text more smart?

2013-06-03 Thread soffolk Zhu
The truncate result is pool mostly time, so i think a more meaningful is useful 在 2013年6月2日星期日UTC+8上午4时30分12秒,tamouse写道: > > soffolk Zhu > wrote: > > sometimes we need to truncate a long text more smart. > > > > The Model layer represents your domain model (such as Account, > Product, Per

Re: [Rails] How to restart AR transaction?

2013-06-03 Thread Scott Ribe
On Jun 3, 2013, at 9:27 AM, Ken Ip wrote: > and PG would still complain about it with "PG::Error: ERROR: current > transaction is aborted, commands ignored until end of transaction block". So > my question is whether there is a proper way of restarting the transaction? > Thanks! rollback --

[Rails] Re: inverse_of and #save called multiple times

2013-06-03 Thread Michel Pigassou
Hmm thanks. Is it worth it to report this to the Rails team? On Monday, June 3, 2013 5:17:37 PM UTC+2, Rick wrote: > > I just noticed that your error does, in fact, appear in my output. > However, if I run inside of the rails console I don't see the redundant > "Here". i.e.: > > /Dagnan/rails_

Re: [Rails] please give some tutorial about Testing in Rails with Rspec and TDD

2013-06-03 Thread Dave Aronson
On Mon, Jun 3, 2013 at 11:32 AM, haxuan lac wrote: > I try to search some Link in Internet but I want somebody can give me > instruction about Rspec and TDD. http://lmgtfy.com/?q=rspec+tdd http://catb.org/~esr/faqs/smart-questions.html -- Dave Aronson, the T. Rex of Codosaurus LLC, secret-clea

[Rails] please give some tutorial about Testing in Rails with Rspec and TDD

2013-06-03 Thread haxuan lac
Hi I'm doing with Test in Rails with Rspec and TDD I try to search some Link in Internet but I want somebody can give me instruction about Rspec and TDD. Thanks... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] How to restart AR transaction?

2013-06-03 Thread Ken Ip
http://edgeapi.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html under "Exception handling and rolling back" says that "*One should restart the entire transaction if an ActiveRecord::StatementInvalid occurred.*" My question is how? I tried wrapping the statements in two sep

[Rails] Re: inverse_of and #save called multiple times

2013-06-03 Thread Rick
I just noticed that your error does, in fact, appear in my output. However, if I run inside of the rails console I don't see the redundant "Here". i.e.: /Dagnan/rails_inverse_of 659 > rails c Loading development environment (Rails 3.2.13) irb(main):001:0> c = Campaign.new => # irb(main):002:0>

[Rails] Re: inverse_of and #save called multiple times

2013-06-03 Thread Rick
I cannot duplicate your error running your github example. Here's what I see: /Dagnan/rails_inverse_of 656 > rails --version Rails 3.2.13 /Dagnan/rails_inverse_of 657 > ruby --version ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] /Dagnan/rails_inverse_of 658 > ruby -Itest test/

Re: [Rails] Is it possible to run some script before controller is hit

2013-06-03 Thread Colin Law
On 3 June 2013 07:07, Damjan Rems wrote: > This has everything to do with new European cookie law ;-( > > Is it possible to start some script (on every call), before rails > application is hit. Script would check for the presence of a cookie and > if it is there just pass control forward. If not i

Re: [Rails] sidekiq: push background results to front

2013-06-03 Thread Walter Lee Davis
On Jun 2, 2013, at 11:17 PM, Soichi Ishida wrote: > Rails 3.2.11 > Sidekiq latest > > My app continues background jobs that generate texts as the output. > > class ProcessText >include Sidekiq::Worker > >def perform(name, count) >puts "executing..." >@feed = Feed.first

[Rails] Re: Is it possible to run some script before controller is hit

2013-06-03 Thread Robert Walker
Dheeraj Kumar wrote in post #091: > I'd do this in the client site - with javascript. JavaScript can easily be disabled by the user. The solution has to be done server side, so Rack middleware is the way to go as Frederick mentioned. -- Posted via http://www.ruby-forum.com/. -- You recei

[Rails] Re: Ruby on Rail Developer Openings-Berlin,Hamburg,Munich

2013-06-03 Thread Maheshwari Shinde
Drfrog wrote in post #1110474: > I'm interest please provide email to send my resume too > > Cphone resea...@kimberlite-consulting.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 unsubsc

[Rails] Re: Ruby on Rail Developer Openings-Berlin,Hamburg,Munich

2013-06-03 Thread Maheshwari Shinde
Arvind Vyas wrote in post #1110480: > 'm interest please provide email to send my resume too resea...@kimberlite-consulting.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 unsubscribe fr

[Rails] Re: resource management tool.

2013-06-03 Thread Dani Dani
tamouse mailing lists wrote in post #116: > sorry, that term is just too ambiguous. what sort of resources? > what/how > do you want to manage them? what do you want this plug-in to actually > do? the resources are: lesson, trainer & location. planning a course, we need to find out whether f

Re: [Rails] resource management tool.

2013-06-03 Thread tamouse mailing lists
sorry, that term is just too ambiguous. what sort of resources? what/how do you want to manage them? what do you want this plug-in to actually do? On Jun 3, 2013 5:37 AM, "Dani Dani" wrote: > Hi, > Does anyone know any good plugin/opensource "resource management tool" ? > I need it for my cours

Re: [Rails] resource management tool.

2013-06-03 Thread Colin Law
On 3 June 2013 11:37, Dani Dani wrote: > Hi, > Does anyone know any good plugin/opensource "resource management tool" ? > I need it for my course management project. Do you mean something that runs on rails? Colin -- You received this message because you are subscribed to the Google Groups "Ru

[Rails] Re: resource management tool.

2013-06-03 Thread Dani Dani
Colin Law wrote in post #112: > On 3 June 2013 11:37, Dani Dani wrote: > Do you mean something that runs on rails? > > Colin Thanks for the quick response. Yes, something to integrate in our ruby on rails project. Thanks. Dani -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] resource management tool.

2013-06-03 Thread Dani Dani
Hi, Does anyone know any good plugin/opensource "resource management tool" ? I need it for my course management project. Thanks in advance for any information. Regrads Dani -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "

[Rails] Re: Re: Regarding Future in ROR

2013-06-03 Thread Love U Ruby
Colin Law wrote in post #105: > On 3 June 2013 09:35, Love U Ruby wrote: >> What would be the expected salary maximum and minimum of an ROR >> developer and only a Ruby developer? > > That rather depends on which part of the world you are working in. > > Colin I am from India. -- Posted via

Re: [Rails] Re: Regarding Future in ROR

2013-06-03 Thread Colin Law
On 3 June 2013 09:35, Love U Ruby wrote: > What would be the expected salary maximum and minimum of an ROR > developer and only a Ruby developer? That rather depends on which part of the world you are working in. Colin > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this m

[Rails] Re: Regarding Future in ROR

2013-06-03 Thread Love U Ruby
What would be the expected salary maximum and minimum of an ROR developer and only a Ruby developer? -- 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 unsubscribe from this group and stop rece

[Rails] Re: Action Mailer issue

2013-06-03 Thread andreo
so have you checked if you have a template on the path that he is trying to look for it? On Wednesday, 29 May 2013 14:32:12 UTC+2, amit agarwal wrote: > > Hi > > I am using rails 2.3.5 + ruby 1.9.3 > > i am trying to send mails from application , it working fine , but when i > called method

Re: [Rails] Ruby 2.0 is running, but Rails 4 doesn't see it.

2013-06-03 Thread Colin Law
On 2 June 2013 22:20, Alphonse 23 wrote: > What am I doing wrong?? > > @ubuntu:~/ruby/things_i_bought$ rake db:migrate > > Rails 4 prefers to run on Ruby 2.0. > > You're running > ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] Try bundle exec rake db:migrate Colin > >

[Rails] Re: Is it possible to run some script before controller is hit

2013-06-03 Thread Frederick Cheung
On Monday, June 3, 2013 7:07:22 AM UTC+1, Ruby-Forum.com User wrote: > > This has everything to do with new European cookie law ;-( > > Is it possible to start some script (on every call), before rails > application is hit. Script would check for the presence of a cookie and > if it is there j