[Rails] Rails error while trying to delete: No route matches [GET]
Hello, I am a newbie with Rails and I am having a problem with my study application (Rails 3.2.6), when using Destroy links, I get the following message: Routing Error No route matches [GET] /comments/2 I can see that the Destroy link are calling a GET command instead of a delete method. I've searched a lot about this problem, but couln't find the reason, hope anyone can help me. *_comment.html.erb:* *h4%= comment.name % said:/h4* * %= simple_format comment.body %* * Sent %= time_ago_in_words comment.created_at % ago* * %= link_to Destroy, comment_path(comment), method: :delete , :data = { :confirm = Are you sure?} %* *comments_controller.rb:* * class CommentsController ApplicationController* * def create* * @job = Job.find(params[:job_id])* * @comment = @job.comments.build(params[:comment])* * if @comment.save* * flash[:notice] = Comment was created with success!* * else* * flash[:alert] = Please fill in all fields to create a comment.* * end* * redirect_to @job* * end* * def destroy* * @comment = Comment.find(params[:id])* * @comment.destroy* * redirect_to @comment.job, notice: Comment destroyed with success.* * end* * end* *rake routes:* * root/jobs#premium* *companies_login GET/companies/login(.:format) login#new* * POST /companies/login(.:format) login#create* * companies POST /companies(.:format) companies#create* * new_company GET/companies/new(.:format) companies#new* * job_comments POST /jobs/:job_id/comments(.:format) comments#create* * jobs GET/jobs(.:format) jobs#index* * POST /jobs(.:format) jobs#create* * new_job GET/jobs/new(.:format) jobs#new* * edit_job GET/jobs/:id/edit(.:format) jobs#edit* * job GET/jobs/:id(.:format) jobs#show* * PUT/jobs/:id(.:format) jobs#update* * DELETE /jobs/:id(.:format) jobs#destroy* * comment DELETE /comments/:id(.:format) comments#destroy* * hello_world GET/hello/world(.:format) hello#world* -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5a17b4ff-44fe-4651-9aff-eb22202b76d5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Rails] Rails error: invalid byte sequence in UTF-8
Hello, i have a app on rails 3.2.1 and i use a jquery lib called jQuery Timelinr 0.9.5: http://www.csslab.cl/2011/08/18/jquery-timelinr/ but, when i use it on a .erb view, i got a error: Showing * /home/carlos.ribeiro/projetos/amarribo/app/views/conheca/historico.html.erb* where line *#59* raised: invalid byte sequence in UTF-8 Extracted source (around line *#59*): 57: 58: %= stylesheet_link_tag timeline % 59: %= javascript_include_tag timeline/jquery.timelinr-0.9.51 % 60: 61: script 62: $(function(){ but when i remove the line 59, the error stop. Anybody have an idea about it??? 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Rails error: invalid byte sequence in UTF-8
Maybe this help http://stackoverflow.com/questions/7837350/sprockets-encoding-error-on-js-file-invalid-utf-8-byte-sequence https://github.com/sstephenson/sprockets/issues/87#issuecomment-1344825 -- 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 more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Rails error: invalid byte sequence in UTF-8
when i execute this rake task https://gist.github.com/1301199/a19adcb7687f2adfc927c9e8da3d716960833797 , don't return me errors, all file is ok.. 2012/9/10 Javier Quarite jquari...@gmail.com Maybe this help http://stackoverflow.com/questions/7837350/sprockets-encoding-error-on-js-file-invalid-utf-8-byte-sequence https://github.com/sstephenson/sprockets/issues/87#issuecomment-1344825 -- 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 more options, visit https://groups.google.com/groups/opt_out. -- 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 more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Rails error: invalid byte sequence in UTF-8
I've used this file https://github.com/juanbrujo/jQuery-Timelinr/blob/master/js/jquery.timelinr-0.9.5.js I've downloaded it and then in irb did f = File.read(/path/to/jquery.timelinr-0.9.5.js) f.valid_encoding? = true f.encoding = #Encoding:UTF-8 maybe there's a typo in the file you are using (something like the question in stackoverflow) -- 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 more options, visit https://groups.google.com/groups/opt_out.
Re: [Rails] Rails error: invalid byte sequence in UTF-8
i'm using this file too.. in irb is ok, but when is in rails, a i got the problem.. 2012/9/10 Javier Quarite jquari...@gmail.com I've used this file https://github.com/juanbrujo/jQuery-Timelinr/blob/master/js/jquery.timelinr-0.9.5.js I've downloaded it and then in irb did f = File.read(/path/to/jquery.timelinr-0.9.5.js) f.valid_encoding? = true f.encoding = #Encoding:UTF-8 maybe there's a typo in the file you are using (something like the question in stackoverflow) -- 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 more options, visit https://groups.google.com/groups/opt_out. -- 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 more options, visit https://groups.google.com/groups/opt_out.
[Rails] rails error
I was following a tutorial on ruby on rails and i get this error whenever i try to setup a rails project. Any idea whats wrong? C:\Ruby19 rails library C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_support.rb:29: in `require': C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_ support/inflector.rb:169: syntax error, unexpected ':', expecting keyword_then o r ',' or ';' or '\n' (SyntaxError) when 1: #{number}st ^ C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_support/inflec tor.rb:170: syntax error, unexpected keyword_when, expecting keyword_end when 2: #{number}nd ^ C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_support/inflec tor.rb:171: syntax error, unexpected keyword_when, expecting keyword_end when 3: #{number}rd ^ C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_support/inflec tor.rb:176: syntax error, unexpected keyword_end, expecting $end from C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-1.3.1/lib/active_s upport.rb:29:in `top (required)' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rails-1.1.6/lib/rails_generator. rb:28:in `require' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rails-1.1.6/lib/rails_generator. rb:28:in `top (required)' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rails-1.1.6/bin/rails:13:in `req uire' from C:/Ruby19/lib/ruby/gems/1.9.1/gems/rails-1.1.6/bin/rails:13:in `to p (required)' from C:/Ruby19/bin/rails:19:in `load' from C:/Ruby19/bin/rails:19:in `main' -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Re: [Rails] rails error
On Thu, 2010-02-18 at 17:15 +0100, Spencer Spence wrote: I was following a tutorial on ruby on rails and i get this error whenever i try to setup a rails project. Any idea whats wrong? C:\Ruby19 rails library Not sure, but it's possible that the project name might be causing the issue. Can you create a rails project with another name ? Best regards, Bill -- 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...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
[Rails] Rails Error
I'm totally new with ruby on rails My machine running ubuntu 8.10 and i have installed ruby 1.8.7, rubygems 1.3.1 and rails 2.3.2, sqlite3, postfix adn subversion. The problem is when i want to create a simple blog application this error came out. fa...@fadil-laptop:~$ sudo rails blog /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/ core_ext/uri.rb:8:in `top (required)': uninitialized constant URI::Parser (NameError) from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/ core_ext.rb:3:in `require' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/ core_ext.rb:3:in `block in top (required)' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/ core_ext.rb:1:in `each' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/active_support/ core_ext.rb:1:in `top (required)' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/ active_support.rb:55:in `require' from /var/lib/gems/1.9.0/gems/activesupport-2.3.2/lib/ active_support.rb:55:in `top (required)' from /var/lib/gems/1.9.0/gems/rails-2.3.2/lib/rails_generator.rb: 28:in `require' from /var/lib/gems/1.9.0/gems/rails-2.3.2/lib/rails_generator.rb: 28:in `top (required)' from /var/lib/gems/1.9.0/gems/rails-2.3.2/bin/rails:14:in `require' from /var/lib/gems/1.9.0/gems/rails-2.3.2/bin/rails:14:in `top (required)' from /usr/bin/rails:19:in `load' from /usr/bin/rails:19:in `main' fa...@fadil-laptop:~$ Help me please. Regards. Fadil --~--~-~--~~~---~--~~ 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 more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~--~~~~--~~--~--~---