[Rails] Re: what is mean of Deployment?

2011-04-17 Thread Mohamed Aslam
All most all developers develop application in their local computer. This is called as development environment. Once your development completed, you need to move the application to a production server where other people can use your website. Moving the application from development environment to pr

[Rails] rubygems fail - require hpricot!

2011-04-17 Thread Anush J.
Hi guys, I wanted to fetch some info from webpage and use it in my db. I read hpricot is one way to do it. But the problem is I'm unable to use it with my app. For some reason after successfully installing hpricot it fails when I try to use it in the rails console. I've been trying to fix this for

[Rails] rspec-2.6.0.rc2 is released!

2011-04-17 Thread David Chelimsky
We're releasing rspec-2.6.0.rc2 as a release candidate as there are some internal changes that we'd like to see put through their paces before doing a final release. Note that the changes I speak of are internal. There are no new deprecations in this release, nor any backward-incompatible change

[Rails] Re: Problem with resque; parent process doesn't die

2011-04-17 Thread Nilesh
What if I explicitly exit process(using Process.exit(0)) in FooJob#perform after line Bar.add_jobs? -- 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 f

[Rails] Problem with resque; parent process doesn't die

2011-04-17 Thread Nilesh
I am facing problem in resque process. I have following implementation: /config/resque_schedule.yml add_jobs_to_queue: cron: "15 * * * *" class: FooJob description: "Find results from class Bar and put on queue" /app/jobs/foo_job.rb class FooJob @queue = :normal def self.perform

[Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-17 Thread sol.manager
This totally fixed the problem and my app is now properly doing Solr full text searches of my jobs model. Thank you for the assistance. > Problem is not the route, then. This line (above) should not have an '=' > sign at the beginning. Try > > <% form_tag search_jobs_path, :method => :get do %> >

Re: [Rails] Re: calling methods from one object in another?

2011-04-17 Thread Phil Crissman
Phil On Sun, Apr 17, 2011 at 8:47 PM, Nathan Domier wrote: > Aha! I've figured it out. > > In case anyone else is wondering, I have a current_user defined in > sessions helper, so, I had to include sessionshelper, and set @user = > current_user! > Just in case it helps; if you have a current_u

Re: [Rails] Re: Ruby On Rails 3 and Webrick

2011-04-17 Thread radhames brito
if you are under *nix environtment try installing this packages, use the brew for mac sudo apt-get install libmysql-ruby libmysqlclient-dev -- 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

[Rails] Re: calling methods from one object in another?

2011-04-17 Thread Nathan Domier
Aha! I've figured it out. In case anyone else is wondering, I have a current_user defined in sessions helper, so, I had to include sessionshelper, and set @user = current_user! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Gro

[Rails] Re: calling methods from one object in another?

2011-04-17 Thread Nathan Domier
I wanted to pass it the id of the logged in user. I have some things that I want to show up for some users and not for others. I wanted to use @user.admin? for this, which works fine on the users pages. however, since I can't get the @user assignment to work for pages this isn't working eithe

Re: [Rails] Re: what is mean of Deployment?

2011-04-17 Thread Chris Kottom
Also by default if you'd created the app as a MySQL app in the first place: encoding: utf8 reconnect: false socket: /var/run/mysqld/mysqld.sock HTH. On Sun, Apr 17, 2011 at 6:02 PM, Peter De Berdt wrote: > > On 17 Apr 2011, at 17:04, amrit pal pathak wrote: > > On Apr 17, 7:27 am, Chris Ko

[Rails] Rails 3 render erb text

2011-04-17 Thread Andrew Miehs
Hi all, I have a file called configure.text.erb in views// directory. Why does render 'configure.text.erb' actually work? How does render know that this is plain text? Does it assume this due to the text.erb ending? How does this actually all plumb together? And would be the differe

Re: [Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-17 Thread Phil Crissman
On Sun, Apr 17, 2011 at 4:17 PM, sol.manager wrote: > The full error message goes something like this: > > showing app/views/jobs/_search_form.html.erb where line #1 raised: > > compile error > /Users/aesthetica/Apps/blank-r2311/app/views/jobs/ > _search_form.html.erb:1: syntax error, unexpected

[Rails] handling validation

2011-04-17 Thread Matt Harrison
Hi list, I've started migrating to rails 3 and right now I'm getting to grips with the different methods for handling validation error message. I've found this on asciiguides which seems good, the first code examples which move the error display handling to a partial: http://asciicasts.com/epis

[Rails] Re: Adding composite index to pre-existent table

2011-04-17 Thread Federico
Just easy like that...thank you Fred! (that's my name too btw :) ) On 17 Apr, 21:59, Frederick Cheung wrote: > On Apr 17, 8:19 pm, Federico wrote: > > > Hello everybody, > > I'm a newbie in RoR. > > In order to create a table I've created a migration with the 'rails > > generate model...' comman

[Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-17 Thread sol.manager
The full error message goes something like this: showing app/views/jobs/_search_form.html.erb where line #1 raised: compile error /Users/aesthetica/Apps/blank-r2311/app/views/jobs/ _search_form.html.erb:1: syntax error, unexpected ')' ...obs_path, :method => :get do ).to_s); @output_buffer.concat

[Rails] Re: Rails 3 Crashing On Windows 7

2011-04-17 Thread cipher_neo
sorry, they are all the gems on my system. I only use the following: (from Gemfile) gem 'annotate-models', :require => 'annotate_models' gem 'ruby-debug19' gem 'populator' gem 'faker' gem "mongrel", '1.2.0.pre2' On Apr 16, 4:20 pm, cipher_neo wrote: > sure: > > C:\Windows\System32

[Rails] Problem with new action 'validate'

2011-04-17 Thread Jose tomas R.
I've created a new action in my invitations controller named validate and validation controller/invitations_controller.rb def validate end def validation @invitation = Invitation.find(params(:key)) if @invitation != nil redirect_to new_client_path, :notice => 'Codigo Aceptado' else fl

[Rails] Re: why <% concat(csrf_meta_tag) #aa%> is invalid while <% javascript_include_tag :defaults #abc%> is valid?

2011-04-17 Thread Frederick Cheung
On Apr 17, 7:43 pm, hanzhao wrote: > as the subject said. I assume you mean <%= in the second case. The way that erb generates ruby code from a template means that comments aren't supported - the comment inside the <% tag ends up commenting other bits of the code generated by erb. The only form

Re: [Rails] why <% concat(csrf_meta_tag) #aa%> is invalid while <% javascript_include_tag :defaults #abc%> is valid?

2011-04-17 Thread Michael Pavling
On 17 April 2011 19:43, hanzhao wrote: > why <% concat(csrf_meta_tag) #aa%> is invalid while <% javascript_include_tag > :defaults #abc%> is valid? What's invalid about it? I assume you get some sort of error message... can you post that to enlighten us, please? Personally, though, I find I get

[Rails] Re: Adding composite index to pre-existent table

2011-04-17 Thread Frederick Cheung
On Apr 17, 8:19 pm, Federico wrote: > Hello everybody, > I'm a newbie in RoR. > In order to create a table I've created a migration with the 'rails > generate model...' command. > Now I would like to add a composite index over two columns of this > table with another, new, migration. > Is it pos

[Rails] Need experienced Ruby on Rails developers

2011-04-17 Thread Igor Alcantara
TopTal, LLC __ (Palo Alto, CA, USA) **Job Description**: TopTal is selecting experienced Ruby on Rails programmers who are interested in working remotely for our customers all over the

[Rails] file_column undefined method relative_url_root

2011-04-17 Thread Tara Schultz
I just installed and started using the file_column plugin and am getting the following error: No Method Error undefined method 'relative_url_root' for nil:NilClass Extracted source (around line #5) 5: <%= image_tag url_for_file_column("fan", "image_url") %> I'm running Rails 3.0.1. Does anyone

[Rails] why <% concat(csrf_meta_tag) #aa%> is invalid while <% javascript_include_tag :defaults #abc%> is valid?

2011-04-17 Thread hanzhao
as the subject said. -- 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, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For

[Rails] Adding composite index to pre-existent table

2011-04-17 Thread Federico
Hello everybody, I'm a newbie in RoR. In order to create a table I've created a migration with the 'rails generate model...' command. Now I would like to add a composite index over two columns of this table with another, new, migration. Is it possible? I've read the documentation about the add_inde

[Rails] Assigning admin invalidates the user

2011-04-17 Thread non useless
I am experiencing an issue as I am following the tutorial and currently at the end of chapter 10. When I use toggle in the rails console to flip the admin property of a user from false to true (I'm trying to create an Admin user), I am successful in doing so, however that user becomes invalid, when

[Rails] Integrating the fb_graph or koala gem with devise+mongoid+omniauth in rails 3

2011-04-17 Thread Andy S
I need Facebook API integration in my rails application, but I can't figure out how to store the Facebook access token from Omniauth so that it can be reused later by a Facebook API gem. The Facebook API gems I am considering is fb_graph or koala (don't really care which), but I am open to other so

[Rails] ERROR NameError: uninitialized constant ActiveSupport::Dependencies

2011-04-17 Thread doom spork
Hello all, I keep getting the following error after visiting 127.0.0.1:3000 on a fresh rails 3.0.6 install with ruby 1.9.2. I have tried googling solutions but most results are addressing the issue in rails 2 and suggest adding 'require "threads"' to the boot.rb; this did not resolve my issues.

Re: [Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-17 Thread Phil Crissman
On Sun, Apr 17, 2011 at 12:59 PM, sol.manager wrote: > > > On Apr 16, 11:58 pm, Phil Crissman wrote: > > Phil > > > I tried this and it isn't working out. > I have a job model. In the views/jobs/index.html.erb file I have the > following at the top. > Listing jobs > <%= form_tag search_jobs_path

[Rails] Re: routes question rails 3.0 vs. rails 2.0

2011-04-17 Thread sol.manager
On Apr 16, 11:58 pm, Phil Crissman wrote: > Phil > I tried this and it isn't working out. I have a job model. In the views/jobs/index.html.erb file I have the following at the top. Listing jobs <%= form_tag search_jobs_path, :method => :get do %> <%= text_field_tag :query, params[:query] %> <

[Rails] newbie: to_json only/except + association confusion

2011-04-17 Thread der_tom
hi, i want to return to_json with 'only' and also filtered.so i tried various ways, but none of them are really good: A)#OK , but filter missing format.json { render :json => @project.to_json(:only => [:title ], :include=> { :tasks => {:only=>[:id,:title] } } ) } B)#Not OK > filter does not

[Rails] Re: Ruby On Rails 3 and Webrick

2011-04-17 Thread kdwill
** LOCAL GEMS *** abstract (1.0.0) actionmailer (3.0.6, 2.3.5, 2.2.2, 1.3.6) actionpack (3.0.6, 2.3.5, 2.2.2, 1.13.6) actionwebservice (1.2.6) activemodel (3.0.6) activerecord (3.0.6, 2.3.5, 2.2.2, 1.15.6) activeresource (3.0.6, 2.3.5, 2.2.2) activesupport (3.0.6, 2.3.5, 2.2.2, 1.4.4) acts_as_ferr

Re: [Rails] Re: what is mean of Deployment?

2011-04-17 Thread Peter De Berdt
On 17 Apr 2011, at 17:04, amrit pal pathak wrote: On Apr 17, 7:27 am, Chris Kottom wrote: Are you planning to continue using sqlite in the production environment? Most people don't, but it's not a problem to do so. If not or if the default sqlite settings aren't right for you, then you'

[Rails] Re: what is mean of Deployment?

2011-04-17 Thread amrit pal pathak
On Apr 17, 7:27 am, Chris Kottom wrote: > Are you planning to continue using sqlite in the production environment? >  Most people don't, but it's not a problem to do so. > > If not or if the default sqlite settings aren't right for you, then you'll > need to make some changes, but those will dep

[Rails] Re: Error: uninitialized constant MysqlCompat::MysqlRes

2011-04-17 Thread Tianchen J.
After wrestling with this problem for several days I finally got it nailed. 2 things that I have done that made it work: 1. sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 2. export DYLD_LIBRARY_PATH="/usr/local/m

[Rails] Basic crud pages for STI models

2011-04-17 Thread Perry Smith
If you have a model that is using single table inheritance, the simple new, create, edit, and update methods and views might not do what you want them to do. I have an ActiveRecord::Base with just a name and a type so I can define a Team (type) of "account" and a Dept of Education. But suppose I m

Re: [Rails] Re: what is mean of Deployment?

2011-04-17 Thread Chris Kottom
Are you planning to continue using sqlite in the production environment? Most people don't, but it's not a problem to do so. If not or if the default sqlite settings aren't right for you, then you'll need to make some changes, but those will depend on the environment you're deploying into. But w

Re: [Rails] Re: Ruby On Rails 3 and Webrick

2011-04-17 Thread radhames brito
please post the result of typing gem list -- 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, send email to rubyonrails-talk+unsubscr...

[Rails] Re: Ruby On Rails 3 and Webrick

2011-04-17 Thread kdwill
Thanks for your help. Yes. I doubled checked through the command line and it lists that it's there. I'm lost. On Apr 17, 2:50 am, Fernando Perez wrote: > > /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: > > dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/ > > mysq

Re: [Rails] Re: No route matches "/home/index" with {:method=>:get}

2011-04-17 Thread Jatin kumar
On Sun, Apr 17, 2011 at 9:28 AM, amrit pal pathak wrote: > > > On Apr 17, 2:59 am, Jatin kumar wrote: > > On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak < > amritpalpath...@gmail.com > > > > > > > > > > > > > > > > > > > > > wrote: > > > I followed a tutorial to learn ruby on rails at > > >ht

[Rails] Re: Ruby On Rails 3 and Webrick

2011-04-17 Thread Fernando Perez
> /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: > dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/ > mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib > (LoadError) > Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/ > mysql2.bundle

[Rails] Re: what is mean of Deployment?

2011-04-17 Thread amrit pal pathak
On Apr 17, 4:06 am, Chris Kottom wrote: > In a strict operational sense, the term means installation and > configuration/activation of software on any environment under management, so > it could be meant as production, staging, integration testing, etc.  In the > Rails world where development an

[Rails] Re: No route matches "/home/index" with {:method=>:get}

2011-04-17 Thread amrit pal pathak
On Apr 17, 4:01 am, Chris Kottom wrote: > Also verify that you are _actually_ using Rails 2.3.8.  Very basic check, I > know, but routing syntax is different in Rails 3, and I don't believe older > syntax is supported. I am running rails 2.3.5 and this format worked for me. Thanks -- Y

[Rails] Re: No route matches "/home/index" with {:method=>:get}

2011-04-17 Thread amrit pal pathak
On Apr 17, 2:59 am, Jatin kumar wrote: > On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak > > > > > > > > > > wrote: > > I followed a tutorial to learn ruby on rails at > >http://guides.rubyonrails.org/v2.3.8/getting_started.html > > After creating a view and controller as  "script/generate co

Re: [Rails] Re: what is mean of Deployment?

2011-04-17 Thread Chris Kottom
In a strict operational sense, the term means installation and configuration/activation of software on any environment under management, so it could be meant as production, staging, integration testing, etc. In the Rails world where development and testing are most often virtual environments coexi

Re: [Rails] No route matches "/home/index" with {:method=>:get}

2011-04-17 Thread Chris Kottom
Also verify that you are _actually_ using Rails 2.3.8. Very basic check, I know, but routing syntax is different in Rails 3, and I don't believe older syntax is supported. On Sun, Apr 17, 2011 at 8:59 AM, Jatin kumar wrote: > > > On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak < > amritpalpath

Re: [Rails] Re: what is mean of Deployment?

2011-04-17 Thread Colin Law
On 17 April 2011 07:08, amrit pal pathak wrote: > > > On Apr 16, 11:40 am, Colin Law wrote: >> On 16 April 2011 16:32, amritpal pathak wrote: >> >> > what is meaning of deploy a ruby on rails application?i am new to RoR. >> > please somebody explain it >> >> Deployment is the process of putting

[Rails] Re: belongs_to cache

2011-04-17 Thread Frederick Cheung
On Apr 15, 7:07 pm, koulikoff wrote: > Hello, All! > > I've met the strange behavior and would like to ask the community if > this is normal? > > class TradingAccount < ActiveRecord::Base >   belongs_to :trading_account_type > end > > $ rails c > Loading development environment (Rails 3.0.5) > i

[Rails] Ruby On Rails 3 and Webrick

2011-04-17 Thread kdwill
Hi, Thanks for taking a look at this. I started a beginner's tutorial on RoR through lynda.com. I followed the instructions to the letter. Everything was working so far until I got to accessing Webrick. When I typed in "rails server" to begin work, I got this error message below. /Library/Ruby/G

[Rails] Re: calling methods from one object in another?

2011-04-17 Thread Frederick Cheung
On Apr 17, 6:26 am, Nathan Domier wrote: > I realize the title probably doesn't make much sense, but that was the > best short description I could come up with. > > Anyway, I have users and pages in my site, and was using the following > code in the users controller, which works fine: > > >   d