[Rails] Re: Nested Resource w/ Collection

2011-05-17 Thread Eugen Ciur
> "The action 'posts' could not be found for UsersController" http://localhost:3000/users/posts routes your request to UsersController#posts, but method 'posts' is not there. Add 'posts' method to UsersController, and your problem is solved. http://blog.eugen.co -- Posted via http://www

[Rails] Re: "rails new" command always takes me to help

2011-05-15 Thread Eugen Ciur
What does rails -v tell you ? Also, try running rails new app1 --ruby /path/to/your/matz_ruby Also, try to create different gemsets with rvm and run with different version of rails/ruby. Does it help ? http://blog.eugen.co -- Posted via http://www.ruby-forum.com/. -- You received th

[Rails] Re: Javascript/Ajax questions for rails applications

2011-05-15 Thread Eugen Ciur
> Is this normal? Is the coffeescript compiler just a pure "yes/no" > syntax checker? If so... I really don't think I can use it. I really > want my tools to help me out and give me good feedback. I don't think coffeescript is a yes/no compiler. On their webpage http://jashkenas.github.com/coffee-

[Rails] Re: Rails server comand won't start server: creates new directories

2011-05-12 Thread Eugen Ciur
> Was working yesterday and now doing this. Probably yesterday you installed rvm and switched to rvm 1.9.2 with new rails 3. When you logged in today your rvm, it used as default system's ruby which contains rails 2.x. Use this command to make your ruby 1.9.2 + rails3 environment default one for r

[Rails] Re: Upload video to YouTube from rails app

2011-05-10 Thread Eugen Ciur
Mechanize is a great gem to write 'automate like' tasks like yours. Maybe this link can help http://tenderlovemaking.com/2008/02/26/automated-youtube-uploads/ http://blog.eugen.co -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Goo

[Rails] Re: each do js problem

2011-05-10 Thread Eugen Ciur
>"The subcomments on the first comments subcomments" > >"the subcomments on the first comment and has no effect on it's own >subcomments" > lol :) In jquery there is nice method toggle. .toggle( showOrHide ) showOrHideA Boolean indicating whether to show or hide the elements. With no paramet

[Rails] Re: Exercises book

2011-05-10 Thread Eugen Ciur
You can find a lot of exercises here http://www.rubyquiz.com/ Usually you find problem explanation there, then in plain ruby, people submit their solutions. This is an absolutely great source to learn ruby language without rails. On amazon there is a book 'best of ruby quiz', extracted from sit

[Rails] Re: Hai.am Abhilash a begginer..

2011-05-07 Thread Eugen Ciur
RoR is web application framework and it assumes that you already know ruby programming language. Before learning RoR I think you want to learn ruby language first. Start here http://www.ruby-lang.org/en/documentation/ http://blog.eugen.co -- Posted via http://www.ruby-forum.com/. -- Yo

[Rails] Re: Restful routing seems excessive at times - I want to simplify

2011-05-06 Thread Eugen Ciur
For this route edit_operator_profile GET /operator_profile/:id/edit(.:format) {:action=>"edit", :controller=>"operator_profile"} Below is wrong <%=link_to('Profile',:controller => "operators_profile",:action =>"edit")%> Correct will be <%=link_to('Profile',:controller => "o

[Rails] Re: RestClient send method?

2011-05-06 Thread Eugen Ciur
John, RestClient is a thin wrapper fot Net::HTTP standard library http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html And it assumes that you already know how to use it and why; it just simplifies (if you know how to use Net::HTTP) usage of Net:HTTP. My advice is instead of getting

[Rails] Re: Why returns nil?

2011-05-05 Thread Eugen Ciur
> > # since 'user = find_by_email(email)' was the last evaluated expression > Wrong. In case user doesn't match password then last evaluated statement was if user.has_password?(submitted_password) which is a 'if modifier' for 'return user' statement; and it returned nil. See from irb session:

[Rails] Re: form_for, need to modify the :url based on if it is persisted or not

2011-05-05 Thread Eugen Ciur
You can create a helper method (in helpers/articles_helper.rb): def correct_post_path @article.persisted? comment_article_path : articles_path end And then use this helper in your form builder form_for @article, correct_post_path do ... end That helps ? Maybe you can tell us under what co

[Rails] Re: how to build an e commerce

2011-05-05 Thread Eugen Ciur
These railscasts also will help http://railscasts.com/tags/23 http://blog.eugen.co -- 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-talk@go

[Rails] Re: Help refactoring this controller method

2011-05-04 Thread Eugen Ciur
Maybe what you need is make use of rails_best_practices gem https://github.com/flyerhzm/rails_best_practices once you install it and run in your rails project it will discover this kind of problematic controllers and tell you about 'code smell'. Plus, it will point you to solution on http://rai

[Rails] Re: How TO deploy A Rails application on GoDaddy

2011-05-02 Thread Eugen Ciur
Link below is your answer: http://www.johnyerhot.com/2008/11/04/deployment-nightmare-godaddy/ I don't think godaddy is good place to deploy rails applications. You will save your time and money if you choose another place to host your application. I use linode, thought that one is a VPS which you

[Rails] omniauth, facebook on ruby 1.9.2 and rails 3.0.0

2011-02-21 Thread Eugen Ciur
Hi, I try to use omniauth to authenticate with facebook account, as in Ryan Bates tutorial http://railscasts.com/episodes/235-omniauth-part-1. I have followed all steps in that tutorial. When point my browser to http://localhost:3000/auth/facebook it indeed redirects me to facebook to login. But o

[Rails] rake gems:install without rdoc documentation

2010-10-26 Thread Eugen Ciur
Hello ruby community, By default when I run rake gems:install rake install missing gems altogether with rdoc documentation. Manually I can install gems without rdoc documentation like this: gem install factory_girl --no-rdoc --no-ri How can I configure (rake? rails?or maybe gem pkg manager?)

[Rails] Unable to rrun script/console for newly created project

2010-10-26 Thread Eugen Ciur
Hello Rails community, I create a new project with rails 2.x.y. > rails micro_project Then > cd micro_project An then I try to enter into console: >script/console and rails throws following ugly error: /home/eugenc/.rvm/gems/ruby-1.9.2...@rails238/gems/actionmailer-2.3.8/lib/action_mailer.rb