[Rails] Re: Model using external data source?

2012-09-25 Thread David Paschich
On Tuesday, September 25, 2012 1:08:46 AM UTC-7, Zhongjie Wu wrote: > > Hi, I am writing a management system and one of the datasource is > external(read-only) and I need to use REST API to access them. Can I just > reuse the Model part of MVC but override those database access methods to > do

[Rails] Re: method name resolution

2012-09-25 Thread 7stud --
John Merlino wrote in post #1077564: > For the method invocation expression o.m, Ruby performs name > resolution with the following steps: 1) first, it checks the > eigenclass of o for singleton methods named m. 2) If no method m is > found in the eigenclass, Ruby searches the class of the o for an

[Rails] Re: method name resolution

2012-09-25 Thread John Merlino
The answer is that when Ruby searches for singleton methods in the eigenclass of an object, it also searches the superclass (and all ancestors) of the eigenclass as well. On Sep 25, 11:05 pm, John Merlino wrote: > For the method invocation expression o.m, Ruby performs name > resolution with the

[Rails] Re: Bundle Install ERROR: ERROR: Failed to build gem native extension.

2012-09-25 Thread Tak G.
Jeffrey L. Taylor wrote in post #1077565: > You need to install the BZ compression library, including it's header > files, > usually in libbz2-dev or libbz2-devel. > > HTH, > Jeffrey > > Quoting Tak G. : worked great! thank you so much -- Posted via http://www.ruby-forum.com/. -- You receive

Re: [Rails] Bundle Install ERROR: ERROR: Failed to build gem native extension.

2012-09-25 Thread Jeffrey L. Taylor
You need to install the BZ compression library, including it's header files, usually in libbz2-dev or libbz2-devel. HTH, Jeffrey Quoting Tak G. : > Hello, > > I'm trying to setup postgreSQL onto rails on linux and when I type > bundle install this is the error that i get. I guess its not find

[Rails] method name resolution

2012-09-25 Thread John Merlino
For the method invocation expression o.m, Ruby performs name resolution with the following steps: 1) first, it checks the eigenclass of o for singleton methods named m. 2) If no method m is found in the eigenclass, Ruby searches the class of the o for an instance method named m. 3) If no method m i

[Rails] Re: New To Rails

2012-09-25 Thread DONEIN NET
Walter Davis wrote in post #1077557: > On Sep 25, 2012, at 6:44 PM, DONEIN NET wrote: > >> I am going back and editing the scaffolded screens. >> >> I need to know how to add a dropdown list to the >> admin\regions\_form.html.erb page that would show the countries I have >> added using admin/countr

Re: [Rails] New To Rails

2012-09-25 Thread Walter Lee Davis
On Sep 25, 2012, at 6:44 PM, DONEIN NET wrote: > I am new to Ruby On Rails. > > I have scaffolded a few screens for a website's administration pages. > > For example, right now I have (etc., etc.): > > admin/companies > admin/regions > admin/countries > > I am going back and editing the scaff

[Rails] Bundle Install ERROR: ERROR: Failed to build gem native extension.

2012-09-25 Thread Tak G.
Hello, I'm trying to setup postgreSQL onto rails on linux and when I type bundle install this is the error that i get. I guess its not finding the files Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/taka/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extc

Re: [Rails] problem with git clone.. Permission denied (publickey) :( HELP!

2012-09-25 Thread Victor Goff
The problem is likely nothing to do with your git install. It directs more toward your SSH keys. If you are using Google, type the following line into the search box. site:heroku.com ssh It should give you better Google results. Namely, likely the Heroku "Managing Your SSH Keys | Heroku Dev Ce

[Rails] New To Rails

2012-09-25 Thread DONEIN NET
I am new to Ruby On Rails. I have scaffolded a few screens for a website's administration pages. For example, right now I have (etc., etc.): admin/companies admin/regions admin/countries I am going back and editing the scaffolded screens. I need to know how to add a dropdown list to the admin\

[Rails] problem with git clone.. Permission denied (publickey) :( HELP!

2012-09-25 Thread Ai Romantiku
hello when i want to clone apps on my pc he give me this error. Romantiku@ROMANTIKU-PC ~ $ git clone g...@heroku.com:view.git Cloning into 'view'... The authenticity of host 'heroku.com (50.19.85.154)' can't be established. RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad. Ar

Re: [Rails] User & Profile w/ Devise

2012-09-25 Thread Christopher R. Maden
On 09/24/2012 01:18 PM, jason baguio wrote: > I am using Devise and am trying to allow each user to create 1 > profile (they can currently make many). I am able to send the the > newly registered user to the page where they can create a profile, > but when the User logs in it will not go to the

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread thiagocifani
In the past month I've applied for a company in berlin, I am from brazil, but when the HR guy told me about the taxes, it drives me crazy. About Wener's explanation, 30k is the amount that you will receive after all taxes discounts. What means that if you have a salary around 4k you are going to re

Re: [Rails] Show thumbnail preview of image before upload

2012-09-25 Thread Norbert Melzer
2012/9/25 Avantec Van : > Is there any ruby way to show thumbnail preview of image before upload? No! There can't be! Ruby needs you to have that image on the server to generate a thumb of it, but before the upload it is not on the server. What you try here, is not possible in PHP, whatever.NET

[Rails] Show thumbnail preview of image before upload

2012-09-25 Thread Avantec Van
Is there any ruby way to show thumbnail preview of image before upload? Using below javascript, I can achieve this window.URL = window.URL || window.webkitURL; var fileElem = document.getElementById("fileElem"); function handleFiles(files) { var img = document.getElementById("image

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread Evan Misshula
Hi Werner, Any recommendations on work visas for Americans for those of us without an EU passport? Thanks, Evan On Tue, Sep 25, 2012 at 11:52 AM, powi wrote: > Ah, forget my previous post, around ~1,5k will go to paying the bills, > food etc. so it's about 1k staying in your pocket for enterta

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
Ah, forget my previous post, around ~1,5k will go to paying the bills, food etc. so it's about 1k staying in your pocket for entertainment or anything else that's not a required expense. On Tuesday, 25 September 2012 18:48:46 UTC+3, powi wrote: > > Hi Werner, thanks for your helpful answers! > >

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
Hi Werner, thanks for your helpful answers! When you say 30k, you mean after paying bills (house, food etc), right? On Tuesday, 25 September 2012 17:39:20 UTC+3, Werner Laude wrote: > > > Am 25.09.2012 um 15:35 schrieb powi >: > > Santiago.. > > Hi Werner. > > Well I'm 24, I have a lot of experie

Re: [Rails] 'gvim' is not recognized as an internal or external command, operable program or batch file.

2012-09-25 Thread Peter Hickman
Do you have gvim installed? If not then install it, otherwise it will be a path issue -- 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,

Re: [Rails] Self-Referencial ActiveRecord Relations

2012-09-25 Thread Dave Aronson
On Mon, Sep 24, 2012 at 1:22 PM, Dreescan wrote: > How can I implement such a thing in rails 3.2, or have you got a nice > reference for this matter ? Great reference for you: http://guides.rubyonrails.org/association_basics.html When you're done with that, go up a level and see what else the

[Rails] Ruby on Rails developer in Denver

2012-09-25 Thread Galaxy Unite
We are looking for a Ruby on Rails developer in Denver. Know anyone? There are a bunch of jobs here: http://galaxyunite.com/projects.aspx -- 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-t

Re: [Rails] Rails 3 routes

2012-09-25 Thread Zhongjie Wu
Using the scaffolding will help you observe > rails g scaffold -h # get help > rails g scaffold Product name:string url:string Refer to the book “agile web development with rails” On Tuesday, September 25, 2012 12:27:46 AM UTC-7, keerthi priya wrote: > > any sample code plz > > On Tue, Sep 25, 201

[Rails] Model using external data source?

2012-09-25 Thread Zhongjie Wu
Hi, I am writing a management system and one of the datasource is external(read-only) and I need to use REST API to access them. Can I just reuse the Model part of MVC but override those database access methods to do REST calls instead? Thanks, Zhongjie -- You received this message because y

[Rails] Self-Referencial ActiveRecord Relations

2012-09-25 Thread Dreescan
Hi Guys, I'm new to Rails so my question might sound rather dull but here it goes: I've got an User model, and a Group model which has a name . A User can have none or many groups of Users A User can be related to many users without any group (friendship) How can I implement such a thing in rail

[Rails] 'gvim' is not recognized as an internal or external command, operable program or batch file.

2012-09-25 Thread Patricia Simone Padua
i just recently installed ruby in rails from railsinstaller.org and follow the 2nd step on the video. Then, suddenly when i'm about to enter the *gvim*on *C:\Sites/railsinstaller_demo *i keep getting same error message.Hope someone would help me -- You received this message because you are sub

Re: [Rails] Re: how to use Ajax

2012-09-25 Thread Hassan Schroeder
On Tue, Sep 25, 2012 at 8:07 AM, Fahim Patel wrote: > is any one know this Stop. This is basic JavaScript/AJAX stuff, and has little to nothing to do with Rails. Find a tutorial on JS/AJAX and learn how it works. Then come back here if you have a specific problem integrating it with your Rails c

[Rails] Re: how to use Ajax

2012-09-25 Thread Fahim Patel
is any one know this On Tuesday, September 25, 2012 7:37:46 PM UTC+5:30, Fahim Patel wrote: > > code : > > Area > <%= f.select :area_id, Area.all.collect {|p| [ p.name, p.id ] }, > :class=>"small" %> > Milk Mans > <%= f.select :milkman_id, Milkman.all.collect {|p| [ p.name, p.id ] }, > :class=>

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread Werner Laude
Am 25.09.2012 um 15:35 schrieb powi : Santiago.. > Hi Werner. > > Well I'm 24, I have a lot of experience generally on computers and web > development (~10 years). So what would you aim for if you were me? It's going > to be a full-time work, I'm going to be a part of the team. Someone > rec

Re: [Rails] Re: How to do this ?

2012-09-25 Thread KUL KING
I understood the question but I don't know that why I am unable to answer this. I think you should provide me the HTML code which is shown in page source after the page is loaded. It's embarrassing for me that I am unable to understand the code in your html.erb file. -- You received this message

[Rails] how to use Ajax

2012-09-25 Thread Fahim Patel
code : Area <%= f.select :area_id, Area.all.collect {|p| [ p.name, p.id ] }, :class=>"small" %> Milk Mans <%= f.select :milkman_id, Milkman.all.collect {|p| [ p.name, p.id ] }, :class=>"small" %> When i select any area then i should see only those milkmans of that area. Till now i getting all

[Rails] Re: How to do this ?

2012-09-25 Thread Fahim Patel
code : Area <%= f.select :area_id, Area.all.collect {|p| [ p.name, p.id ] }, :class=>"small" %> Milk Mans <%= f.select :milkman_id, Milkman.all.collect {|p| [ p.name, p.id ] }, :class=>"small" %> When i select any area then i should see only those milkmans of that area. Till now i getting all

[Rails] Re: Ruby on Rails salaries in Berlin?

2012-09-25 Thread powi
Hi Werner. Well I'm 24, I have a lot of experience generally on computers and web development (~10 years). So what would you aim for if you were me? It's going to be a full-time work, I'm going to be a part of the team. Someone recommended ~50k (I'm a junior in Rails, but learning fast and buil

Re: [Rails] Gem

2012-09-25 Thread KUL KING
It doesn't make sense that a role has different permissions. You can create more roles and assign them different permissions. The purpose you are trying to achieve will always require different roles. On Tue, Sep 25, 2012 at 5:54 PM, Avi wrote: > Well, as per the requirement, the role is one- i

Re: [Rails] Gem

2012-09-25 Thread Avi
Well, as per the requirement, the role is one- i.e. Admin. But permissions need to be different for admin users. On Tuesday, September 25, 2012 5:59:19 PM UTC+5:30, Kashif Umair Liaqat wrote: > > You can have 5 different roles with different permissions you want to > assign each of the admin.

Re: [Rails] Rails 3 routes

2012-09-25 Thread KUL KING
OK. Thanks. On Tue, Sep 25, 2012 at 5:41 PM, Matt Jones wrote: > > > On Tuesday, 25 September 2012 03:39:10 UTC-4, Kashif Umair Liaqat wrote: >> >> You can use resources in following three different ways. >> >> resources :users >> >> All the methods in Users controller will have routes defined i

Re: [Rails] Rails 3 routes

2012-09-25 Thread Matt Jones
On Tuesday, 25 September 2012 03:39:10 UTC-4, Kashif Umair Liaqat wrote: > > You can use resources in following three different ways. > > resources :users > > All the methods in Users controller will have routes defined if you add > above line in your routes.rb file. For example users controller

Re: [Rails] Gem

2012-09-25 Thread KUL KING
You can have 5 different roles with different permissions you want to assign each of the admin. On Tue, Sep 25, 2012 at 4:42 PM, Avi wrote: > Thanks for reply. > > So here is the requirement :- > > I have an Admin (Admin is a role). & under Admin there are 5 users. All > users(same role as Admin

Re: [Rails] Insert multiple datasets - one form

2012-09-25 Thread Werner Laude
Am 25.09.2012 um 13:34 schrieb Avi : > You can try using simple_form_for instead of form_for. > Check this link :- https://github.com/plataformatec/simple_form > > <%= form_for @instruction_user, :url => some_path do |f|%> > > <% @users.each do |user| %> > <%= user.name %> I have tried: <%= fo

[Rails] Convert base64 encode string into image using paperclip

2012-09-25 Thread ruby pa
Hi, I'm new in Ruby how to convert base64 encode string into image. any one give some ideas... -- 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-ta

Re: [Rails] Gem

2012-09-25 Thread Avi
Thanks for reply. So here is the requirement :- I have an Admin (Admin is a role). & under Admin there are 5 users. All users(same role as Admin) have different permissions. Those users can be differentiated by their permissions to perform tasks. Admin need to assign different different permiss

[Rails] Re: Insert multiple datasets - one form

2012-09-25 Thread Avi
You can try using simple_form_for instead of form_for. Check this link :- https://github.com/plataformatec/simple_form On Monday, September 24, 2012 6:41:15 PM UTC+5:30, Werner wrote: > > Hello.. > > I have a form: > > <%= form_for @instruction_user, :url => some_path do |f|%> > > <% @users.each d

Re: [Rails] Gem

2012-09-25 Thread KUL KING
The purpose you want to achieve includes a huge number of if conditions. I can give an example but better is that you provide some scenario. On Tue, Sep 25, 2012 at 4:26 PM, KUL KING wrote: > Can you explain with an example so that I can better solve your problem? > > > On Tue, Sep 25, 2012 at 1

Re: [Rails] Gem

2012-09-25 Thread KUL KING
Can you explain with an example so that I can better solve your problem? On Tue, Sep 25, 2012 at 1:40 PM, Avi wrote: > There can be multiple permissions for a single role. How to handle that? > > > On Tuesday, September 25, 2012 2:06:07 PM UTC+5:30, Kashif Umair Liaqat > wrote: > >> You can set

Re: [Rails] Rails 3 routes

2012-09-25 Thread KUL KING
You are welcome. By the way does it solve your problem? As I am also a newbie in rails with 2-3 months experience. On Tue, Sep 25, 2012 at 3:51 PM, keerthi priya < emailtokeerthipr...@gmail.com> wrote: > Thank you very much Mr.King > > > On Tue, Sep 25, 2012 at 1:07 PM, KUL KING wrote: > >> You

Re: [Rails] Insert multiple datasets - one form

2012-09-25 Thread Werner Laude
Am 25.09.2012 um 03:59 schrieb David Angga : Thanks David.. may be I have to describe it better ... the form: <%= form_for @instruction_user, :url => some_path do |f|%> <% @users.each do | user | %> <%= f.input :prio, collection: 1..5, :as => :radio_buttons%> <%= f.text_field :remark%> <%= chec

Re: [Rails] Devise Gem

2012-09-25 Thread Loganathan Sellapa
Refer http://railscasts.com/ regards, Loganathan Mob: +91 7760780741 | +91 9944414388 Skype: loganathan.sellappa ViewMe On Tue, Sep 25, 2012 at 4:25 PM, keerthi priya < emailtokeerthipr...@gmail.com> wrote: > Hi all > >i am learning how to implement de

[Rails] Devise Gem

2012-09-25 Thread keerthi priya
Hi all i am learning how to implement devise gem but i just want to know do i need to write the login code first and then runt this command " rails generate devise:install " or run the command first and then go for login code. can any one tell me what to do. Cheers Kp -- You receive

Re: [Rails] Rails 3 routes

2012-09-25 Thread keerthi priya
Thank you very much Mr.King On Tue, Sep 25, 2012 at 1:07 PM, KUL KING wrote: > You can use resources in following three different ways. > > resources :users > > All the methods in Users controller will have routes defined if you add > above line in your routes.rb file. For example users controll

[Rails] Re: Gem

2012-09-25 Thread Avi
Yes, this makes some sense. But this is helpful, when you have only one user per role. Suppose you are an admin. & under Admin there are 5 sub-admins. All sub-admins have different permissions, but role is still the Admin. Admin need to assign different different permissions to those 5 sub-admins

[Rails] Re: Gem

2012-09-25 Thread Rajesh reddy
Hi, Iam using the rolify gem in my project and found it to be very useful check this out http://eppo.github.com/rolify/ Thanks, On Tuesday, September 25, 2012 1:56:50 PM UTC+5:30, Avi wrote: > > Hello All, > > Is there any gem for Authorising Permission based on users ? > Like Cancan is used f

Re: [Rails] Gem

2012-09-25 Thread Avi
There can be multiple permissions for a single role. How to handle that? On Tuesday, September 25, 2012 2:06:07 PM UTC+5:30, Kashif Umair Liaqat wrote: > > You can set permissions for every role using CanCan. > > On Tue, Sep 25, 2012 at 1:26 PM, Avi >wrote: > >> Hello All, >> >> Is there any gem

Re: [Rails] Gem

2012-09-25 Thread KUL KING
You can set permissions for every role using CanCan. On Tue, Sep 25, 2012 at 1:26 PM, Avi wrote: > Hello All, > > Is there any gem for Authorising Permission based on users ? > Like Cancan is used for role based authorisation. > > > > Thanks. > > -- > You received this message because you are su

Re: [Rails] Ruby on Rails salaries in Berlin?

2012-09-25 Thread Werner Laude
Am 24.09.2012 um 20:17 schrieb powi : Hi Santiago > > > Also, does anybody knows what's the average IT salary in Berlin for Rails > developers? > > I work in Berlin for 60.- / h as a freelancer. As a junior, it will be less. Depends also from your age/experience. In the moment they are q

[Rails] Gem

2012-09-25 Thread Avi
Hello All, Is there any gem for Authorising Permission based on users ? Like Cancan is used for role based authorisation. Thanks. -- 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@go

Re: [Rails] Rails 3 routes

2012-09-25 Thread KUL KING
You can use resources in following three different ways. resources :users All the methods in Users controller will have routes defined if you add above line in your routes.rb file. For example users controller have method #index then you will be able to open the url http://localhost:3000/users.

Re: [Rails] Rails 3 routes

2012-09-25 Thread keerthi priya
any sample code plz On Tue, Sep 25, 2012 at 11:15 AM, KUL KING wrote: > You can use the resources keyword. > > > On Tue, Sep 25, 2012 at 10:35 AM, keerthi priya < > emailtokeerthipr...@gmail.com> wrote: > >> Hi all am learning rails 3.2.8 and i found that in routes if i have a >> controller call