[Rails] [ANN] Public release of Rbkit - the new Ruby profiler

2015-01-16 Thread Emil S
Hello Rubyists, Our team at Codemancers have been hard at work on Rbkit - the new Ruby profiler with a GUI. Today, we are making this tool available to the public. To download or learn more about Rbkit, head over to rbkit.codemancers.com . Try it and let us know ! - Emil -- You received this

Re: [Rails] Token authenctication

2014-09-04 Thread Emil S
Sander, devise( https://github.com/plataformatec/devise ) + doorkeeper( https://github.com/doorkeeper-gem/doorkeeper ) may work well for your case. Doorkeeper is based on OAuth specs which is pretty solid for token based auth. A google search involving both the gems would give you enough material

Re: [Rails] Dependencies in the gemspec

2014-05-05 Thread Emil S
Runtime dependencies are the gems required by your gem during its runtime, ie, the gems without which your gem can't work. Development dependencies are those which are required only while developing the gem (example: rspec, pry ) . When you do gem install gemname or when bundler installs your gem

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

2014-03-12 Thread Emil S
There's no best practice here. The ruby style guidehttps://github.com/bbatsov/ruby-style-guide#stringswhich Rubocop depends on, which is kind of popular, allows both conventions. The key here is to pick one style and stick with it. My team here uses Rubocop with one of the

Re: [Rails] How do I use Chef to manage database parameters?

2013-11-10 Thread Emil S
Take a look at the chef docs . They have all of this covered in there . On 10 Nov 2013 12:59, Jason Hsu, Rubyist jhsu802...@gmail.com wrote: Thanks, but I still don't understand how to use chef. Let's say that I'm using PostgreSQL for my database, and the name of the database is pg_test1.

Re: [Rails] How do I use Chef to manage database parameters?

2013-11-08 Thread Emil S
Chef has this thing called DataBags ( http://docs.opscode.com/essentials_data_bags.html ) . You can use the knife command to set the database password from your workstation. All the nodes which are registered with the server should be able to search the data bag and retrieve the password. - Emil

Re: [Rails] Free ad space if you donate to RVM

2013-11-07 Thread Emil S
Just curious. Did you get any comment about the cover being sexist ? It may help to get more ads if you change the cover to something else , just my opinion . On 7 Nov 2013 20:55, Karthikeyan A.K mindas...@gmail.com wrote: Hello People, I am very much fond of rvm http://rvm.io/ . All the apps

Re: [Rails] Rails 4 + AngularJs (unembedded client) integration sample

2013-10-18 Thread Emil S
Thanks for sharing ! On 18 October 2013 12:15, Carmine M. li...@ruby-forum.com wrote: Hi everybody, I'm experimenting with Rails and AngularJs (as unembedded client) and decided to upload to a public github repository my efforts. Of course, everything is just a toy application I use to

Re: [Rails] RSpec vs. Cucumber

2013-09-08 Thread Emil S
I meant to say simply use Rack::Test to make the requests while testing, Capybara isn't useful for interacting with an API directly. On 8 September 2013 23:43, Tamara Temple tamouse.li...@gmail.com wrote: On Sep 8, 2013, at 12:41 AM, Emil S emil.so...@gmail.com wrote: Andre, what you need

Re: [Rails] Re: RSpec vs. Cucumber

2013-09-07 Thread Emil S
Andre, what you need is Rack::Test, not capybara. On 8 September 2013 03:54, and...@benjamin.dk wrote: Hi Emil, Can you show me that example in cucumber but written in Rspec I been trying to solve that problem and dont seem to be able to send the parameters in json to the page using rspec

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

2013-09-07 Thread Emil S
This may help you : http://matthewlehner.net/rails-api-testing-guidelines/ On 8 September 2013 04:33, André Orvalho and...@benjamin.dk wrote: Hello there, I have found ur post while googlin. Its very useful if you wanna use cucumber. I dont like cucumber for many reasons and would like to

Re: [Rails] Re: What exactly is rake

2013-09-06 Thread Emil S
That's good. Now you have a chance to learn what make is. I'm sure it would come in handy . On 6 September 2013 12:09, Vijay Bhargav li...@ruby-forum.com wrote: Hi Dheeraj, I tried. at most of the places it said its like make. but i am not aware of what is make. more over most of google

Re: [Rails] How to get local variable name from object id or memory reference in ruby?

2013-09-06 Thread Emil S
I don't think that will be possible. A variable has an identifier ( in your case, n1 ) and a reference to an object ( Sample:0x13bc648 ) so when you say n1 , it knows which object it references and returns that. As far as I know Ruby doesn't keep track of reference counts of an object and the

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

2013-09-05 Thread Emil S
What you are asking for is a way to test your API from the perspective of a client ( like curl ) . I wanted to do the same thing in a project I worked on, and I used Cucumber + Rack::Test + some JSON helper methods and I am really happy with how it worked out. I've blogged about this here :

Re: [Rails] Search Multiple Categories

2013-09-02 Thread Emil S
Just use the boolean operator AND in your search query. This should work both for simple SQL queries on your database and for queries on hosted search servers which ( thinking sphix , cloudsearch , etc ) . What have you tried so far ? On 31 August 2013 06:55, zachariah ngonyani

Re: [Rails] Re: RSpec vs. Cucumber

2013-08-24 Thread Emil S
I'm a big fan of RSpec, and I use it all the time. But I think Cucumber wins hands down in generating readable test outputs which can be important in many scenarios. Let me explain one such scenario which I faced in one of my projects. I was working on a Rails API app which would serve as the

Re: [Rails] Devise Gem

2013-08-22 Thread Emil S
Did you get a chance to read the Devise wiki ? It's pretty straightforward : https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview - Emil On 22 August 2013 14:37, Rekha Benada rekha.ben...@gmail.com wrote: Hi, How to use Devise Gem in rails? What basic configuration is required

Re: [Rails] RSpec vs. Cucumber

2013-08-22 Thread Emil S
My rule of thumb : Cucumber for integration testing ( output = documentation of features ) and RSpec for unit testing ( output = documentation of code ) On 23 August 2013 03:18, Tamara Temple tamouse.li...@gmail.com wrote: On Aug 22, 2013, at 4:29 PM, Jason Hsu, Android developer

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

2013-07-23 Thread Emil S
The user actually uses the email ID and can remember it . I can never remember my usernames , usually. Also forgot password becomes easy with email ID's . But then again, to each, his own. On 22 July 2013 21:09, Robert Walker li...@ruby-forum.com wrote: Emil S. wrote in post #1116233: I use

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

2013-07-22 Thread Emil S
I use email for login , so I do this in the console/database seed file : User.create(email: 't...@test.com', password: 'password123', password_confirmation: 'password123') Then I log in with the t...@test.com and password123 On 22 July 2013 17:21, Dheeraj Kumar a.dheeraj.ku...@gmail.com

Re: [Rails] installing rvm in home directory or system-wide?

2013-07-16 Thread Emil S
I hope you have gone through this : https://rvm.io/rvm/install . System wide RVM will let you use the same installation for all users on the system. But I've seen many junior devs screw up their dev environment by trying a system wide RVM installation but didn't follow the instructions correctly.

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

2013-07-15 Thread Emil S
Can you go through this guide first ? http://guides.rubyonrails.org/routing.html Do get back if you still feel lost. On 15 July 2013 16:01, lekha p. li...@ruby-forum.com wrote: yes i did.. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

Re: [Rails] Need guidance for a simple search Rails application

2013-07-15 Thread Emil S
I didn't exactly get your question. Are you looking for a way to search for the records ? If the number of rows is huge and you need full text search, you may need to look at Solr or Sphinx or AWS CloudSearch for fast queries. If time is not a big concern, you may even be able to do away with

Re: [Rails] Re: Efficient background process

2013-05-30 Thread Emil S
If you are talking about a system where a polling happens for jobs, and then the processing of the jobs happens independently, I'd suggest decoupling the two parts. This is how I would go about it ( using AWS ) * 1 EC2 instance to do the polling. * an SQS( a queue ) into which the polling EC2

Re: [Rails] Should Customers and Admins be on Separate Tables?

2013-05-25 Thread Emil S
In agreement with Colin's point here. If they all log in with the same login form, I'd store them in a single users table and have a roles field that would help authorize requests using something like CanCan . On 25 May 2013 12:10, Colin Law clan...@googlemail.com wrote: On 25 May 2013 03:55,

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

2013-05-18 Thread Emil S
I guess you have installed rake in your `global` gemset for the ruby version you are using. Go outside the project and run `rvm use ruby version@global` and then `gem list`. If you see rake in the list, that means you have it in the global gemset. No matter which gemset you use with the ruby

Re: [Rails] Is there any way to update the javascript when I reload the page using rails?

2013-05-02 Thread Emil S
You don't need to precompile your assets in development environment. Remove config.assets.compile = false from config/environments/development.rb if it's there. Read this stackoverflow questionhttp://stackoverflow.com/questions/8821864/config-assets-compile-true-in-rails-production-why-notfor a

Re: [Rails] Re: Does anyone who USES Rails hate Rails?

2013-05-02 Thread Emil S
I agree that ORMs tend to make you think un-object-orientedly sometimes Isn't the primary purpose of ORM to provide an object oriented way of dealing with your data ? I've been using Rails for 4 years, and I don't complain. I can ask an absolute beginner in rails to build something for me, and

Re: [Rails] how to encrypt password in php

2013-05-02 Thread Emil S
How about migrating your user table using ActiveRecord? I can get the data of a user from the old DB in some way, and migrate into the new DB using this : User.create(email: 't...@test.com', password: 'unencrypted password from old db', password_confirmation :'same_password') On 3 May 2013