Re: [Rails] Ruby on Rails log file

2015-07-07 Thread Dheeraj Kumar
Send it to a logstash instance? https://github.com/dwbutler/logstash-logger On Tue, Jul 7, 2015 at 11:40 AM, Raj Kumar wrote: > I have deployed a ruby on rails app on two instances of production server, > now there are two separate log file are being created for different > instances. My questio

Re: [Rails] jtable for rails 4

2014-04-24 Thread Dheeraj Kumar
Why can't you use the jquery plugin itself? On Thu, Apr 24, 2014 at 4:33 PM, Ravi Vendan wrote: > jtable-rails not updated for 3 years. > > It is great, If I can able to use jquery jtable. > > > On Thursday, April 24, 2014 3:42:08 AM UTC-4, Siegfried wrote: > >> Have you checked this? https://g

Re: [Rails] Re: Looking for some glue between Strong Parameters and CanCan

2014-03-27 Thread Dheeraj Kumar
What you're looking for is this: https://github.com/permitters/permitters On Thu, Mar 27, 2014 at 1:25 PM, Sebastian Gaul wrote: > Thanks for your answers. I already know cancancan, but it doesn't solve my > issue. I'm looking for a way to use cancan to determine my strong > parameters (see my e

Re: [Rails] What is your style? Single quote, double quotes or depends?

2014-03-12 Thread Dheeraj Kumar
I use single quotes for the same reasons as you :) I use double quotes only when I'm doing interpolation. On Thu, Mar 13, 2014 at 10:22 AM, Brandon wrote: > I'm curious what is the best practice here.. Do you use single quote for > both .html.erb and .rb files? > > I try to use single quote fir

Re: [Rails] How to get around a reserved word

2014-03-04 Thread Dheeraj Kumar
Namespace it? Product::Action for the model, and product_action_path(@instance_var) in the routes. On Wed, Mar 5, 2014 at 12:32 PM, Walter Lee Davis wrote: > I need to use the model name 'Action' (which will not work in Rails 4.0.3) > for business reasons (it's a product name). If I name the act

Re: [Rails] Testing strong parameters

2014-03-04 Thread Dheeraj Kumar
Use permitters instead. Easily testable. On Mar 5, 2014 3:26 AM, "bertly_the_coder" wrote: > LOL! Thx Dave. > > Anyone else figured/figuring this out or found some documentation about it? > > On Tuesday, March 4, 2014 10:02:50 PM UTC+3, Dave Aronson wrote: >> >> On Tue, Mar 4, 2014 at 1:13 PM, be

Re: [Rails] Standard Way To Create Meta Project

2014-01-18 Thread Dheeraj Kumar
It's called "multitenant" and 2 is the best way to do it :-) On Jan 18, 2014 6:52 PM, "Kyle Fazzari" < ruby_on_rails_t...@status.e4ward.com> wrote: > Hello all. I'm not even sure what to call what I'm trying to do, so I'm > calling it a "meta project." It's not all that complicated... I just want

Re: [Rails] Why not make Opal default for Rails?

2014-01-02 Thread Dheeraj Kumar
It just sucks. On Jan 2, 2014 6:56 PM, "Karthikeyan A K" <77mi...@gmail.com> wrote: > Hello People, > > I just read this blog post > http://piotrsarnacki.com/2014/01/01/i-am-tired-by-rails-should-fundamentally-change-crowd/. > > Rails started with a mission to make web development easy. Part of it

Re: [Rails] What Gives? If Rails is so good why is it so hard to install it?

2013-12-28 Thread Dheeraj Kumar
I use a script called RailsReady, which sets up a fresh OSX/Ubuntu/CentOS installation with Homebrew, RVM, Ruby, all supporting libraries, Bundler, Passenger, Rails, Git. https://github.com/joshfng/railsready I've used it > 100 times, and it has never given me a problem. -- Dheer

Re: [Rails] Controller function - Length

2013-12-01 Thread Dheeraj Kumar
Use a service object. Google "Service Object Rails" for more. -- Dheeraj Kumar On Monday, 2 December 2013 at 11:46 am, lekha p. wrote: > Hi all, > what you used to do when your controller function gets lengthy > sometimes ? > a way i found is just split the function

Re: [Rails] Raising exception in call back

2013-11-25 Thread Dheeraj Kumar
Of course. Those callbacks are synchronous, so the controller will catch those exceptions. -- Dheeraj Kumar On Tuesday, 26 November 2013 at 11:58 am, Junil J. wrote: > Is it possible to catch exceptions raised in callbacks like after_create > in the controller? > > -- >

Re: [Rails] Re: Can we keep validation in memcached ?

2013-11-04 Thread Dheeraj Kumar
First validate the data, and then insert it to the database. Till then, it’s read from the file and still in-memory. I’m not bringing the cache into the picture at all. -- Dheeraj Kumar On Tuesday, 5 November 2013 at 11:24 am, Fahim Patel wrote: > @dheeraj - thanks for reply.I am us

Re: [Rails] Re: Can we keep validation in memcached ?

2013-11-04 Thread Dheeraj Kumar
list of all errors with row numbers. I’ve used this method in our app, and is working out great for our users. -- Dheeraj Kumar On Tuesday, 5 November 2013 at 10:45 am, Fahim Patel wrote: > @tam - I am even not sure how can experiment it. Collecting data and > studying in progress.

Re: [Rails] how is mongoid syntax implemented ?

2013-10-23 Thread Dheeraj Kumar
It's the new hash syntax introduced in ruby 1.9. On Oct 23, 2013 11:22 PM, "Jedrin" wrote: > > In mongoid, a ORM mapped database object is like below. The part "type: > String" seems to me to not fit into any standard ruby syntax and I was > curious how does mongoid implement that ? > > > class S

Re: [Rails] Looking for RoR friends

2013-10-21 Thread Dheeraj Kumar
Contact your local ruby user group. -- Dheeraj Kumar On Monday 21 October 2013 at 1:03 AM, Srivigneshwar Rabindranath Prasad wrote: > This is quiet off topic but I am looking for friends from this group. Reply > me :) > > -- > You received this message because you are su

Re: [Rails] how can i make a web crawler in ruby

2013-10-10 Thread Dheeraj Kumar
Ruby has nothing to do with it. Think about how you will make a web crawler in any language. Come up with an algorithm, and implement it using ruby. Try googling if you are stuck. On Oct 11, 2013 7:53 AM, "K Selvaganapathy" wrote: > i need step by step procedure/guidance to understand as > entry-

Re: [Rails] webcrawler in ruby

2013-10-10 Thread Dheeraj Kumar
Now, go read the gem's documentation and try out the code. On Oct 11, 2013 7:53 AM, "K Selvaganapathy" wrote: > i got succeed in "gem install anemone" then what's my next step to build a > Web crawler. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on R

Re: [Rails] Confusion with Hash duplicate key removal

2013-09-09 Thread Dheeraj Kumar
h = Hash.new h.has_key?('foo') If you try to create duplicate keys, the existing value is replaced by the new one. h = {"foo" =>2,"foo" =>3} h # => {"foo"=>3} h['foo'] = 'bar' h # => {"foo"=>'ba

Re: [Rails] could not find JavaScript runtime error while doing rails -s

2013-09-09 Thread Dheeraj Kumar
Install nodejs. -- Dheeraj Kumar On Sunday 8 September 2013 at 10:43 PM, EtikaNewBie wrote: > Hello > Iam a new bie in rails and facing problem while running rails server > Iam not able to install my rails properly > Error: Could not find Javascript runtime error > I tried t

Re: [Rails] testing a REST API that receives params in json and returns data in json

2013-09-08 Thread Dheeraj Kumar
Did you try reading the Rspec docs? Also, this would help you: http://edgeguides.rubyonrails.org/testing.html#what-to-include-in-your-functional-tests -- Dheeraj Kumar On Sunday 8 September 2013 at 4:44 PM, André Orvalho wrote: > Hi Emil, > > I have also found that link and

Re: [Rails] What exactly is rake

2013-09-05 Thread Dheeraj Kumar
Did you try googling? http://rake.rubyforge.org/ -- Dheeraj Kumar On Friday 6 September 2013 at 11:26 AM, Vijay Bhargav wrote: > Hi Friends, > > I am a newbie to Ruby on rails. i would like to know what exactly is > Rake. > > Thanks > Vijay > > -- > Posted

Re: [Rails] heroku reacher 5 free apps showing varify your account message

2013-09-04 Thread Dheeraj Kumar
Why don't you try reading their documentation? It's there for a reason. https://devcenter.heroku.com/categories/billing https://devcenter.heroku.com/articles/account-verification -- Dheeraj Kumar On Thursday 5 September 2013 at 10:46 AM, mukul saharia wrote: > hello developers,

Re: [Rails] Basic doubt in MVC - RoR

2013-08-31 Thread Dheeraj Kumar
You would need a separate controller to handle the sign-in part, with its own views. When it's successful, it should redirect you to the A controller. This is how most apps do it. -- Dheeraj Kumar On Sunday 1 September 2013 at 3:48 AM, Rita Ferreira wrote: > Hi, > I'm w

Re: [Rails] Re: Re: Concatenate two arrays

2013-08-29 Thread Dheeraj Kumar
tions. -- Dheeraj Kumar On Friday 30 August 2013 at 3:32 AM, Alex Froelich wrote: > Dheeraj Kumar wrote in post #1120004: > > Could you paste your test? > > > > -- > > Dheeraj Kumar > > > > > The code for the number of arguments and the part which is fa

Re: [Rails] Re: Concatenate two arrays

2013-08-29 Thread Dheeraj Kumar
Could you paste your test? -- Dheeraj Kumar On Friday 30 August 2013 at 2:37 AM, Alex Froelich wrote: > Dheeraj Kumar wrote in post #1119995: > > def array_sum(array1 = [], array2 = []) > > array1 + array2 > > end > > > > array_sum([1,2,3],

Re: [Rails] Concatenate two arrays

2013-08-29 Thread Dheeraj Kumar
Colin is right. You should try reading a book, like this one: http://pragprog.com/book/ruby4/programming-ruby-1-9-2-0 -- Dheeraj Kumar On Friday 30 August 2013 at 2:12 AM, Colin Law wrote: > On 29 August 2013 21:40, Dheeraj Kumar (mailto:a.dheeraj.ku...@gmail.com)> wrote: > > d

Re: [Rails] Concatenate two arrays

2013-08-29 Thread Dheeraj Kumar
def array_sum(array1 = [], array2 = []) array1 + array2 end array_sum([1,2,3], [4,5,6]) => [1, 2, 3, 4, 5, 6] -- Dheeraj Kumar On Friday 30 August 2013 at 2:01 AM, Alex Froelich wrote: > Hello again ruby community! > > I just learned how to add two arrays(I know, i know). >

Re: [Rails] Deploying Rails 4 to VPS

2013-08-28 Thread Dheeraj Kumar
Of course! https://coderwall.com/p/yz8cha -- Dheeraj Kumar On Wednesday 28 August 2013 at 8:03 PM, Chris Peterson wrote: > Hello! > > I now have a VPS and I've been playing with it a bit. It is running Debian > 7.0. I'm wondering how to set up my environment to dep

Re: [Rails] Re: Re: Re: Re: Re: Why NaN.class throws NameError ?

2013-08-27 Thread Dheeraj Kumar
Float::NAN contains a special float value NaN. -- Dheeraj Kumar On Tuesday 27 August 2013 at 9:44 PM, Love U Ruby wrote: > Dheeraj Kumar wrote in post #1119727: > > You spelt it wrong. > > > > instance_of?, not instace_of? > > > OMG!! Thanks for the pointe

Re: [Rails] Re: Re: Re: Re: Why NaN.class throws NameError ?

2013-08-27 Thread Dheeraj Kumar
You spelt it wrong. instance_of?, not instace_of? -- Dheeraj Kumar On Tuesday 27 August 2013 at 9:06 PM, Love U Ruby wrote: > Dheeraj Kumar wrote in post #1119723: > > Can you post the code you're confused with? > > > See here :- > > > C:\>i

Re: [Rails] Re: Re: Re: Why NaN.class throws NameError ?

2013-08-27 Thread Dheeraj Kumar
Can you post the code you're confused with? -- Dheeraj Kumar On Tuesday 27 August 2013 at 8:45 PM, Love U Ruby wrote: > Dheeraj Kumar wrote in post #1119714: > > Float::NAN is a constant which holds a special float value `NaN` > > > @Dheeraj You are right..But m

Re: [Rails] Re: Re: Why NaN.class throws NameError ?

2013-08-27 Thread Dheeraj Kumar
Float::NAN is a constant which holds a special float value `NaN` -- Dheeraj Kumar On Tuesday 27 August 2013 at 8:04 PM, Love U Ruby wrote: > Dheeraj Kumar wrote in post #1119707: > > NAN is namespaced under Float. So you can only access it through > > Float::NAN. > > >

Re: [Rails] Re: Why NaN.class throws NameError ?

2013-08-27 Thread Dheeraj Kumar
NAN is namespaced under Float. So you can only access it through Float::NAN. -- Dheeraj Kumar On Tuesday 27 August 2013 at 6:08 PM, jsnark wrote: > class Foo > Bar = 10 > end # => 10 > Foo::Bar # => 10 > Foo::Bar.class #=> Fixnum > Bar.class > NameError: unin

Re: [Rails] Re: Merging two images.

2013-08-13 Thread Dheeraj Kumar
Why don't you try googling? -- Dheeraj Kumar On Tuesday 13 August 2013 at 12:39 PM, Manoj M. wrote: > Dheeraj Kumar wrote in post #1118551: > > You need ImageMagick. Play around with it. Then use RMagick to implement > > the same thing in your ruby app. > >

Re: [Rails] Merging two images.

2013-08-12 Thread Dheeraj Kumar
You need ImageMagick. Play around with it. Then use RMagick to implement the same thing in your ruby app. -- Dheeraj Kumar On Tuesday 13 August 2013 at 12:20 PM, Manoj M. wrote: > Hi i need a help, > > > I am using paperclip to deal with images. > My new need is to merge

Re: [Rails] Rails Guides publishing delay?

2013-08-11 Thread Dheeraj Kumar
Read http://edgeguides.rubyonrails.org -- Dheeraj Kumar On Sunday 11 August 2013 at 9:14 AM, Dow Drake wrote: > I was just wondering why the published Rails Getting Started guide > (http://guides.rubyonrails.org/getting_started.html) seems to be so far > behind the source

Re: [Rails] I cannot cannot connec the mysql2 gem

2013-08-11 Thread Dheeraj Kumar
Have you installed mysql libraries? -- Dheeraj Kumar On Friday 9 August 2013 at 9:17 PM, Harish Vishnu wrote: > rails s > /usr/local/share/gems/gems/mysql2-0.3.13/lib/mysql2.rb:8:in `require': cannot > load such file -- mysql2/mysql2 (LoadError) > from /usr/local/share

Re: [Rails] Unable to connect Mysql2 or Sqlite3 on windows

2013-08-09 Thread Dheeraj Kumar
Getting good support for rails in windows is difficult. Why don't you switch to Ubuntu or OSX? -- Dheeraj Kumar On Thursday 8 August 2013 at 1:39 AM, Alexandre Alves wrote: > Hi every body. > I would like to know if this problem is occurs only with me? > I was unable to

Re: [Rails] Rails 4 , how to validate form with remote tag on client side?

2013-08-09 Thread Dheeraj Kumar
Use client_side_validations -- Dheeraj Kumar On Thursday 8 August 2013 at 2:07 PM, Дмитрий Татаркин wrote: > I need pure javascript validation for ajax form. Rails 4 docs lacks in this > part. > -- > You received this message because you are subscribed to the Google Groups

Re: [Rails] Getting started with rails guide: Encountering problems at Section 5.1

2013-08-09 Thread Dheeraj Kumar
Why don't you do what the error says? run "rake db:migrate RAILS_ENV=development" -- Dheeraj Kumar On Wednesday 7 August 2013 at 9:58 PM, Jenson Lu wrote: > Hi people, > > I need some help here. I'm new to ROR, and is following the guideline on > "Ge

Re: [Rails] Find URL paramenters from a string

2013-08-08 Thread Dheeraj Kumar
Pass it only the string after the `?` -- Dheeraj Kumar On Thursday 8 August 2013 at 10:59 PM, Renato Co wrote: > I have a string which contain some parameters I want to extract but I > cant get it to look good. Here is what I have right now > > > puts > Rack::Utils

Re: [Rails] Re: Issue with mering ActiveRecord query results

2013-08-08 Thread Dheeraj Kumar
@Joel: It isn't Hash#merge, but ActiveRecord::SpawnMethods#merge -- Dheeraj Kumar On Thursday 8 August 2013 at 10:00 PM, Joel Pearson wrote: > If you were going to use Hash#merge to remove duplicates between the two > result sets, you might as well just use Array#uniq o

Re: [Rails] Re: [JOBS] RoR, Bangalore Exp 4-6 Years - Tavant Technologies

2013-08-06 Thread Dheeraj Kumar
Please respond directly to the OP, and not spam the group with your details. -- Dheeraj Kumar On Tuesday 6 August 2013 at 10:45 PM, Pankaj P. wrote: > I have attached my resume, My Contact number is 9811659521. > > araj > > Attachments: > http://www.ruby-forum.c

Re: [Rails] Required :Embed voice recorder on a webpage for a rural innovation project

2013-08-01 Thread Dheeraj Kumar
Use https://code.google.com/p/wami-recorder/ -- Dheeraj Kumar On Thursday 1 August 2013 at 4:58 PM, sunandan madan wrote: > Dear Ruby Community, > > We are a startup (Dhwani Rural Information Systems > (http://dhwani.herokuapp.com)) who help build customized and scalable ICT

Re: [Rails] Want to send password via SMS

2013-07-24 Thread Dheeraj Kumar
Even when you completely capitalize your question, yes. -- Dheeraj Kumar On Wednesday 24 July 2013 at 8:35 PM, honey ruby wrote: > THANKS DHEERAJ, IS IT IMPOSSIBLE FOR SURE > > > On Wed, Jul 24, 2013 at 8:30 PM, Dheeraj Kumar (mailto:a.dheeraj.ku...@gmail.com)> wrote: &g

Re: [Rails] Want to send password via SMS

2013-07-24 Thread Dheeraj Kumar
You cannot un-hash those passwords. So no, it is not possible. -- Dheeraj Kumar On Wednesday 24 July 2013 at 8:13 PM, honey ruby wrote: > Hi I am saving password with hashed_password and salt in table. Now I need to > send those passwords via SMS can it be possible.Kindly give m

Re: [Rails] where to add action when getting started with rails

2013-07-23 Thread Dheeraj Kumar
Rails guides are merely guides to using various features of rails, and not a guide to learning rails from a beginner's POV. For that, I highly recommend http://ruby.railstutorial.org/ruby-on-rails-tutorial-book, which is a free online book. -- Dheeraj Kumar On Wednesday 24 July 2013 at

Re: [Rails] How to create first user for sign in using devise

2013-07-22 Thread Dheeraj Kumar
Create a new User object, then fill in the fields, and call save. -- Dheeraj Kumar On Monday 22 July 2013 at 5:19 PM, Tushar Patil wrote: > Hi, >I want to authentication for sign in and sign out, i add gem file and > create a user model using devise in rails3, i want to crea

Re: [Rails] How to use twitter bootstrap

2013-07-20 Thread Dheeraj Kumar
Bootstrap is a CSS framework, it can be used with any HTML page. I suggest you go read the Bootstrap documentation first. -- Dheeraj Kumar On Saturday 20 July 2013 at 4:18 PM, Tushar Patil wrote: > > Hi, > I have a Ruby 1.9.3p194 and Rails 4.0.0, Can i used twitter-boot

Re: [Rails] Installing RVM Problems

2013-07-18 Thread Dheeraj Kumar
upgrade_oh_my_zsh On Fri, Jul 19, 2013 at 11:41 AM, Jayant S. wrote: > How do I update my zsh if I am getting the error message, ” WARNING: In > case of using Zsh, version 4.3.12 / 5.0.0+ is recommended, you have > 4.3.11, errors to be expected.” when installing RVM? I am new to > developing wi

Re: [Rails] help regarding internationalization for bootstrap button.

2013-07-17 Thread Dheeraj Kumar
A key is a symbol. Don't use capitalization or whitespace in it. -- Dheeraj Kumar On Wednesday 17 July 2013 at 5:09 PM, Colin Law wrote: > On 17 July 2013 12:24, Tushar Patil (mailto:tushar01pa...@gmail.com)> wrote: > > Hi, > > I am trying to convert my application

Re: [Rails] Install Rails 4 correctly on OS X Mountain Lion

2013-07-17 Thread Dheeraj Kumar
I usually use https://github.com/joshfng/railsready - a single command install for an entire rails development setup. -- Dheeraj Kumar On Wednesday 17 July 2013 at 1:35 PM, Nico S. wrote: > After reading several books and tutorials on Rails, I found it difficult > to get a step by step

Re: [Rails] Re: Please give me some example about highchart in Rails using highcharts-rails gem

2013-07-15 Thread Dheeraj Kumar
Do the gem setup as it says on github, then use Highcharts' examples to guide you. -- Dheeraj Kumar On Tuesday 16 July 2013 at 9:56 AM, haxuan lac wrote: > I want a simple example using gem highchart-rails. > but I also see example with gem lazy-highchart. > So I expect some

Re: [Rails] Please give me some example about highchart in Rails using highcharts-rails gem

2013-07-15 Thread Dheeraj Kumar
Highcharts is pretty simple to use. What's your problem? -- Dheeraj Kumar On Tuesday 16 July 2013 at 9:11 AM, haxuan lac wrote: > I have to build some report screeen for my project > I want to use highcharts-rails gem to build this screen > I research some document about it but

Re: [Rails] Rendering Partials from another Folder

2013-07-15 Thread Dheeraj Kumar
The object you're using to render the form is nil. -- Dheeraj Kumar On Tuesday 16 July 2013 at 2:34 AM, Giannakis P. wrote: > Hello Guys :) > I'm fairly new to Rails and a problem keeps bugging me for days now. > > I'mt Trying to render a Partial from my App/view/p

Re: [Rails] Re: Re: Re: REST IN RUBY ON RAILS

2013-07-15 Thread Dheeraj Kumar
generate a scaffold. -- Dheeraj Kumar On Monday 15 July 2013 at 3:34 PM, lekha p. wrote: > yes i created a application.. so where it comes? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Gro

Re: [Rails] Re: Re: REST IN RUBY ON RAILS

2013-07-15 Thread Dheeraj Kumar
Create a new rails application, generate a new scaffold, and check it out for yourself. -- Dheeraj Kumar On Monday 15 July 2013 at 3:30 PM, lekha p. wrote: > ok could please help me to know how it is implemented in rails, like > telling a example. > > -- > Posted via

Re: [Rails] Re: REST IN RUBY ON RAILS

2013-07-15 Thread Dheeraj Kumar
They are all controller actions. Methods, if you prefer. -- Dheeraj Kumar On Monday 15 July 2013 at 3:25 PM, lekha p. wrote: > Dheeraj Kumar wrote in post #1115456: > > It means the same thing in all web frameworks. > > > > http://en.wikipedia.org/wiki/Representa

Re: [Rails] REST IN RUBY ON RAILS

2013-07-15 Thread Dheeraj Kumar
It means the same thing in all web frameworks. http://en.wikipedia.org/wiki/Representational_state_transfer -- Dheeraj Kumar On Monday 15 July 2013 at 3:11 PM, lekha p. wrote: > Hello Friends, > Can anybody explain me, What is Rest mean in RUBY ON RAILS... > > -- >

Re: [Rails] Want a sample working source code for multi language application

2013-07-15 Thread Dheeraj Kumar
You already asked this before. Same answer, read edgeguides.rubyonrails.org/i18n.html -- Dheeraj Kumar On Monday 15 July 2013 at 1:48 PM, Tushar Patil wrote: > If any one have a sample rails application, which is in multiple language, > please send me or just give me the link. I am

Re: [Rails] How to convert web application in multiplie language (MARATHI)

2013-07-12 Thread Dheeraj Kumar
Next time, just google. http://edgeguides.rubyonrails.org/i18n.html -- Dheeraj Kumar On Saturday 13 July 2013 at 9:32 AM, Tushar Patil wrote: > > Hello, > > I am new to ruby on rails, I done a time sheet application in English > it's works fine, I want to conv

Re: [Rails] Delayed job in Rails 4

2013-07-08 Thread Dheeraj Kumar
post bundler output. -- Dheeraj Kumar On Monday 8 July 2013 at 4:45 PM, Karthikeyan A k wrote: > Hello People, > > One of my application being developed in Rails 4 needs delayed job, but > for some reason when I add this gem > https://github.com/collectiveidea/delayed_job to

Re: [Rails] Re: Help refactoring

2013-07-02 Thread Dheeraj Kumar
[:anno_a, :anno_b, :anno_c, :anno_d].each do |key| @formatted_question[key] = @question[:correct_anno] if @formatted_question[key].length < 2 end -- Dheeraj Kumar On Wednesday 3 July 2013 at 9:08 AM, Dave Castellano wrote: > Dave Castellano wrote in post #1114260: > > Dheeraj

Re: [Rails] Help refactoring

2013-07-02 Thread Dheeraj Kumar
@formatted_question.each_pair do |key, value| @formatted_question[key] = @question[:correct_anno] if value.length < 2 end -- Dheeraj Kumar On Wednesday 3 July 2013 at 8:19 AM, Dave Castellano wrote: > Hello, > > I'm learning rails and starting to try to refactor

Re: [Rails] Installing gems to user directory - Configurations - How to ?

2013-06-24 Thread Dheeraj Kumar
You could use rvm or rbenv instead. On Jun 24, 2013 10:05 PM, "Boopathi Rajaa" wrote: > I compiled Ruby from source, and installed it to /opt/ruby/ . > The purpose is to have two versions of Ruby 1.9 and Ruby 1.8 ... Certain > users can use 1.9 > > After creating a rails app (rails new app) , Whe

Re: [Rails] Need help to learn Webservices

2013-06-19 Thread Dheeraj Kumar
If you don't know what web services are, please google, learn, and come back when you have a problem with soap4r. -- Dheeraj Kumar On Thursday 20 June 2013 at 10:07 AM, Khan wrote: > Hi all, > I want to learn webservices using soap4r gem. I have no idea what it > is

Re: [Rails] What is a "--mountable" option in rails plugin generator?

2013-06-07 Thread Dheeraj Kumar
http://edgeguides.rubyonrails.org/engines.html -- Dheeraj Kumar On Saturday 8 June 2013 at 2:15 AM, Wins Lin wrote: > There is no any info about "--mountable" option in Rails Guides about > plugins. What is this for? Where is it possible to see full explanation? > &g

Re: [Rails] how to add gdal with rails application , now working with gdal 1.8 in ubuntu 10.10

2013-06-07 Thread Dheeraj Kumar
1. sudo apt-get uninstall 2. apt-cache showpkg pick a version string from there. 3. sudo apt-get install = -- Dheeraj Kumar On Friday 7 June 2013 at 5:46 PM, Arvind Vyas wrote: > how , i am not getting the command :( > > > On Fri, Jun 7, 2013 at 5:39 PM, D

Re: [Rails] how to add gdal with rails application , now working with gdal 1.8 in ubuntu 10.10

2013-06-07 Thread Dheeraj Kumar
remove 1.8 and install 1.7? -- Dheeraj Kumar On Friday 7 June 2013 at 5:36 PM, Arvind Vyas wrote: > I need to downgrade the gdal version , i am working in remote system so have > only command prompt so if anybudy know how to either downgrade gdal version > from 1.8 to 1.7 or any

Re: [Rails] Re: resource management tool.

2013-06-04 Thread Dheeraj Kumar
I haven't come across any tool that fits your requirements. I suggest you write your own. -- Dheeraj Kumar On Tuesday 4 June 2013 at 3:20 PM, Dani Dani wrote: > can anyone help here ? > thanks > Dani > > -- > Posted via http://www.ruby-forum.com/. > > --

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

2013-06-02 Thread Dheeraj Kumar
I'd do this in the client site - with javascript. -- Dheeraj Kumar On Monday 3 June 2013 at 11:37 AM, 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. S

Re: [Rails] Regarding Future in ROR

2013-06-02 Thread Dheeraj Kumar
you run away. "Is there a future in ROR" Do you think we're idiots to sit around answering on the groups if we don't have a future? We have a future. We, who can think, research, understand and implement efficiently. You, sir, don't. What a typical Indian. -- Dh

Re: [Rails] ObjectSpace methods understanding

2013-05-28 Thread Dheeraj Kumar
http://www.mikeperham.com/2010/02/24/the-trouble-with-ruby-finalizers/ -- Dheeraj Kumar On Tuesday 28 May 2013 at 8:23 PM, Love U Ruby wrote: > Can anyone give me a good example to understand this method ? > > http://ruby-doc.org/core-2.0/ObjectSpace.html#method-c-define_

Re: [Rails] Re: Skip index in array.each_with_index loop

2013-05-23 Thread Dheeraj Kumar
use `next if (i % 10 != 0)` -- Dheeraj Kumar On Thursday 23 May 2013 at 3:25 PM, Ajit Teli wrote: > Dear Dheeraj, > > Thanks for your reply. > > The statement `next` will increment the index by 1. But I want to > increment the index by 10. > > Thanks, > > --

Re: [Rails] Skip index in array.each_with_index loop

2013-05-23 Thread Dheeraj Kumar
Use the `next` statement. http://www.tutorialspoint.com/ruby/ruby_loops.htm -- Dheeraj Kumar On Thursday 23 May 2013 at 2:54 PM, Ajit Teli wrote: > Can anyone help me on how to skip index in ARRAY.each_with_index loop? > > Please look at below case: > > In a ARRAY.each_wit

Re: [Rails] You have already activated rake 10.0.4, but your Gemfile requires rake 10.0.3.

2013-05-18 Thread Dheeraj Kumar
Bundler is present in the global gemset. What I usually do is rvm gemset use @global and then do a gem uninstall bundler On May 18, 2013 10:51 PM, "John Merlino" wrote: > I'm careful to create separate gemsets for each project, so when I run > bundle install, it only installs gems for that gemset

Re: [Rails] Re: Re: Re: Ruby on Rails guidence need

2013-05-16 Thread Dheeraj Kumar
https://github.com/joshfng/railsready -- Dheeraj Kumar On Thursday 16 May 2013 at 2:02 PM, Love U Ruby wrote: > Colin Law wrote in post #1109163: > > On 16 May 2013 08:13, Love U Ruby > (mailto:li...@ruby-forum.com)> wrote: > > > > http://about.me/hassanschroed

Re: [Rails] staging deploy connected to production database

2013-05-15 Thread Dheeraj Kumar
set :rails_env, 'staging' set :rails_env, 'production' ^^ add these in the appropriate files. -- Dheeraj Kumar On Wednesday 15 May 2013 at 9:25 PM, John Merlino wrote: > I'm not sure why but I have both a staging and production deploy using > the 'c

Re: [Rails] Instagram Redirect error

2013-05-14 Thread Dheeraj Kumar
It looks like you're passing a redirect URL to the API while authenticating. You should either not include it, or make sure it's the same as the one you provide in Instagram's app settings. -- Dheeraj Kumar On Tuesday 14 May 2013 at 1:07 PM, Maddy wrote: > Hi Folks, >

Re: [Rails] Re: How to integrate Flickr with Rails

2013-05-13 Thread Dheeraj Kumar
This is probably the best way to integrate Flickr with rails. I've tried this and works great for me! http://bit.ly/125aEob -- Dheeraj Kumar On Monday 13 May 2013 at 3:09 PM, Loganathan Sellapa wrote: > http://railsfornovice.wordpress.com/2011/06/18/flickr-with-rails3/ >

Re: [Rails] Re: store chat conversations

2013-05-09 Thread Dheeraj Kumar
Wow! thank you for posting such a specific question. Learn how to ask questions in an online forum. We cannot read your mind. -- Dheeraj Kumar On Thursday 9 May 2013 at 10:33 PM, Aashish Kiran wrote: > Hassan Schroeder wrote in post #1108423: > > On Thu, May 9, 2013 at 4:04 AM

Re: [Rails] online document editing interface ,Word processor for Rails.

2013-05-06 Thread Dheeraj Kumar
Google "Mercury Editor" On Mon, May 6, 2013 at 3:45 PM, sai kiran mothe wrote: > Hey all, > > Just had a question. I was experimenting with ROR and wanted to see if it > was possible to create an online document editing interface, similar to > something like google docs but I haven't found any

Re: [Rails] Reg : How to Setup debugger in ruby for Rails project.

2013-05-05 Thread Dheeraj Kumar
There's this thing called googling. You should try it sometime. first result: http://guides.rubyonrails.org/debugging_rails_applications.html On Mon, May 6, 2013 at 11:46 AM, thil wrote: > > Hi all, > > Have any one setup Ruby debugger for Rails application > > So that you can use break point

Re: [Rails] Re: Re: Re: Re: new to ruby need help

2013-05-01 Thread Dheeraj Kumar
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book -- Dheeraj Kumar On Wednesday 1 May 2013 at 5:20 PM, gautam s. wrote: > Hi, > > thanks a tonne i finally managed to install ROR perfectly, with all the > help from your side. > Can anyone of you guide me the best tutor

Re: [Rails] Are there Edge API documentation as Edge Guide documentation?

2013-04-25 Thread Dheeraj Kumar
edgeapi.rubyonrails.org -- Dheeraj Kumar On Thursday 25 April 2013 at 5:44 PM, Wins Lin wrote: > Edge Guide sometimes explains methods that are not present in > http://api.rubyonrails.org/. Are there corresponding API docs for Edge? > > -- > Posted via http://www

Re: [Rails] Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please se

2013-04-23 Thread Dheeraj Kumar
The latest bundler is 1.3.5. Try updating it using `gem update bundler` and then running the bundle command. -- Dheeraj Kumar On Tuesday 23 April 2013 at 6:01 PM, Colin Law wrote: > On 23 April 2013 13:22, kanna (mailto:vtrka...@gmail.com)> wrote: > > Hi guys > > > &g

Re: [Rails] Where to find info about seed.rb, db:seed functionality?

2013-04-21 Thread Dheeraj Kumar
You could refer the edge guides: http://edgeguides.rubyonrails.org/migrations.html#migrations-and-seed-data On Sun, Apr 21, 2013 at 4:56 PM, Wins Lin wrote: > There is no any mention about it neither in API nor in Guide. How to use > these features? The only gist with two sentences is in db/see

Re: [Rails] Re: Rails 4.0 has_many_through and fields_for

2013-03-24 Thread Dheeraj Kumar
Your question is wrong. You should not be rendering a form for :interactions (which will be an AR::Relation) using an array. You should rather be initializing the controller_action.interactions directly, and remove the second parameter in the fields_for call. -- Dheeraj Kumar On Sunday 24

Re: [Rails] Rails 4.0 has_many_through and fields_for

2013-03-24 Thread Dheeraj Kumar
Simple. You return an array from initialized_interactions.That's why. -- Dheeraj Kumar On Sunday 24 March 2013 at 5:50 PM, jle...@socit.co.uk wrote: > Hi all, I am trying to reproduce rails 3.2 behaviour with fields_for and > nested attributes. > > class ControllerActi

Re: [Rails] Multiple image upload

2013-03-21 Thread Dheeraj Kumar
Again, what's your question? You seem to have posted a question, described what you want, then also how you would solve it - by saving all images and then editing their content. I really don't see a topic for discussion here. -- Dheeraj Kumar On Thursday 21 March 2013 at 9:30 P

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Dheeraj Kumar
iggering the warning. 1.9.3p374 :001 > Const = 'a' => "a" 1.9.3p374 :002 > Const = 'b' (irb):2: warning: already initialized constant Const => "b" 1.9.3p374 :003 > Const = {a: 'a'} (irb):3: warning: already initialized constant C

Re: [Rails] Re: Change 'nil' using literal notation?

2013-03-20 Thread Dheeraj Kumar
In ruby, any variable whose name starts with a capital letter becomes a constant. -- Dheeraj Kumar On Thursday 21 March 2013 at 5:48 AM, Todd Hartsfield wrote: > umm as long as a variable does not have special characters or a space in > it, as far as I am aware I thought variables ar

Re: [Rails] Getting information from xls file to show on drop down list in rails

2013-03-17 Thread Dheeraj Kumar
Use an iterator. A loop, if you prefer that term. Google ruby loops to get an overview of different constructs ruby supports. You really should go back to a ruby book On Mar 17, 2013 7:54 PM, "NN Dodhia" wrote: > Hey i have an excel file with 2 columns, and i want to get them so that a > user ca

Re: [Rails] Future of Rails technologies

2013-03-15 Thread Dheeraj Kumar
You really need to be more specific. Have you seen this? http://rubyonrails.org/applications -- Dheeraj Kumar On Friday 15 March 2013 at 3:48 PM, lekha p. wrote: > Hi all can you tell me about future of ruby on rails Technolgy > > Regards > Lekha Pillai > > -- > Poste

Re: [Rails] Re: Access instance variable in ajax rendered by controller - Rails

2013-03-13 Thread Dheeraj Kumar
alert(object) calls object.toString() which returns [object Object] for any object. If you want to dump the contents of the object, loop through it and print each key-value pair. -- Dheeraj Kumar On Thursday 14 March 2013 at 10:22 AM, nikhil rn wrote: > If I print the json object value f

Re: [Rails] Form_for text_area

2013-03-13 Thread Dheeraj Kumar
For the default value, add it in the model. Maybe in an after_initialize callback. For the row and col values, read the documentation. http://api.rubyonrails.org/?q=text_area -- Dheeraj Kumar On Wednesday 13 March 2013 at 11:28 AM, karthik Satyanarayana wrote: > Hi all, Since I am new

Re: [Rails] Re: how to deploy rails app to a vps

2013-03-06 Thread Dheeraj Kumar
Could you reply to the same topic instead of creating new posts? It's very annoying. -- Dheeraj Kumar On Wednesday 6 March 2013 at 3:51 PM, nile wrote: > like i have deployed text based normal apps to heroku, but since i wish to > use paperclip , i need to have a amazon s2

Re: [Rails] how to deploy rails app to a vps

2013-03-05 Thread Dheeraj Kumar
Please read Heroku's documentation.That is always better than some article you once read. On Mar 6, 2013 8:30 AM, "nile" wrote: > like i read about the memory once in an article,why isnt it true? , how > much does heroku offer in terms of memory > > -- > You received this message because you are

Re: [Rails] Creating array, decimal

2013-02-27 Thread Dheeraj Kumar
or hours.map(&:my_hour) -- Dheeraj Kumar On Wednesday 27 February 2013 at 6:57 PM, Carlos Mathiasen wrote: > this work for me: > > hours.collect{|h| h.my_hour} > > > Matt's > > On Wed, Feb 27, 2013 at 10:25 AM, Werner (mailto:webagentur.la...@googlem

Re: [Rails] Creating array, decimal

2013-02-27 Thread Dheeraj Kumar
override Hour's to_s method to return my_hour -- Dheeraj Kumar On Wednesday 27 February 2013 at 5:53 PM, Werner wrote: > Hi > I have an attribute decimal => hour > > If I do > > hours.each do |h| > h.my_hour > end > I get => 20.0

  1   2   3   >