[Rails] AASM gem: How to stub or config :no_direct_assignment to false when make rspec on rails?

2015-03-19 Thread Vuong Hung
Hi all, I am newbie AASM. I just tried to use AASM on my project. I have a problem: at Model class Job include AASM aasm :no_direct_assignment = true do state :sleeping, :initial = true state :running state :cleaning event :run do transitions :from = :sleeping, :to =

[Rails] How to add new column into table when server is running?

2011-08-12 Thread Vuong Hung
Hi everybody, I have a problem: I want to insert a new column into a table (person, it ready exits in DB.). But i dont know to do what. Do yo have any idea to help me? Thank you for your reading. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] Have a problem JSON and Hash.

2010-07-30 Thread Vuong Hung
Hi everybody. I have using ActiveSupport::JSON library in rails I have a json string: test= {C1:{id:C1,mode:new,type:block,name:new block C1,unit:,choices:[],index:10},R1:{id:R1,mode:new,type:text,name:new question R1,unit:,choices:[],index:20},R2:{id:R2,mode:new,type:text,name:new question

[Rails] I have problem ....PostgreSQLAdapter::PGconn

2010-06-30 Thread Vuong Hung
I have a problem when i am creating a rails project using postgresql... uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn I have already installed gem postgres-pr. but not start.. I using rails version 2.3.5 Ruby 1.8.7 PostgresSQL 1.10.2. Please help me thanks.

[Rails] App not run when I upload on hosting support RoR

2010-06-30 Thread Vuong Hung
I have app RoR good running on NetBean with JRuby But, I upload up server to server, it not run. I have ready setup rubygem. Cau you help me? please guide detail with me about work from how to upload code to server host and start running app RoR. -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: How to get data from DOM Source other website?

2010-06-16 Thread Vuong Hung
Amar Daxini wrote: Vuong Hung wrote: Hi, everybody. I am newbie RoR. I want to get all data from DOM Source of website. Can you guide me the way to use REXML? I have ready installed lib-xml library but I only use XML::Parser. I don't understant it. Thanks a lot and looking forward

[Rails] how to call a function after 10 minutes or second?

2010-06-16 Thread Vuong Hung
Hi all, I have a problem. I want to call some function after every 10 minutes. But I don't it. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] How to get data from other website?

2010-06-11 Thread Vuong Hung
Hi, everybody. I am newbie RoR. I want to get all data from other website. Thanks a lot and looking forward. -- 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

[Rails] Re: How to get data from other website?

2010-06-11 Thread Vuong Hung
Bala wrote: try hpricot it'll be usefull Thanks, Bala. I try using 'hpricot' but I can get a little data on website, not all. I think some data to view by Ajax or JavaScript. Can you tell me other idea? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Re: How to get data from other website?

2010-06-11 Thread Vuong Hung
Vuong Hung wrote: Bala wrote: try hpricot it'll be usefull Thanks, Bala. I try using 'hpricot' but I can get a little data on website, not all. I think some data to view by Ajax or JavaScript. Can you tell me other idea? Code to this: Controller: @doc = Hpricot(open(http

[Rails] Re: Re: How to get data from other website?

2010-06-11 Thread Vuong Hung
want to place it in the view, then try doc.inner_text to strip of the html tags. On 11 June 2010 15:14, Vuong Hung li...@ruby-forum.com wrote: @doc = Hpricot(open(http://priceonline.hsc.com.vn;)) You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

[Rails] Re: Re: How to get data from other website?

2010-06-11 Thread Vuong Hung
Vuong Hung wrote: Amala Singh wrote: If you put in the view then you may need to strip of the html tags. Try the following in the console. require 'open-uri' require 'nokogiri' doc = Nokogiri::HTML(open(http://www.tamil.net;).read) puts

[Rails] How to get data from website load with ajax?

2010-06-11 Thread Vuong Hung
Hi all, I want to get data from website load with Ajax. Looking forward soon. Thanks all. -- 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

[Rails] Re: Re: Re: How to get data from other website?

2010-06-11 Thread Vuong Hung
Amala Singh wrote: aha. I checked it. I did this: doc = Nokogiri::HTML(open(http://priceonline.hsc.com.vn;).read) my_file = File.new(abc.html, w) my_file.puts doc.inner_html my_file.close And compared the abc.html with the website, abc.html was the very same as the website.

[Rails] Re: How to get data from website load with ajax?

2010-06-11 Thread Vuong Hung
Colin Law wrote: On 11 June 2010 17:03, Vuong Hung li...@ruby-forum.com wrote: Hi all, I want to get data from website load with Ajax. Looking forward soon. I think you will give rather more explanation of what you are trying to do, 'get data from website load with ajax' does not mean much

[Rails] How to get data from DOM Source other website?

2010-06-10 Thread Vuong Hung
Hi, everybody. I am newbie RoR. I want to get all data from DOM Source of website. Can you guide me the way to use REXML? I have ready installed lib-xml library but I only use XML::Parser. I don't understant it. Thanks a lot and looking forward. -- Posted via http://www.ruby-forum.com/. --