Rb Syntax Error Unexpected
Contents |
Sign in Pricing Blog Support syntax error unexpected expecting keyword_end Search GitHub This repository Watch 1,052 Star syntax error, unexpected keyword_end, expecting end-of-input 29,510 Fork 14,044 Homebrew/legacy-homebrew Code Issues 1 Pull requests 0 Projects 0 uninstall brew Pulse Graphs Code issues with install.rb and brew.rb #33913 Closed DerailedJeff opened this Issue Nov 4, 2014 · 2 comments
Homebrew
Labels None yet Milestone No milestone Assignees No one assigned 2 participants DerailedJeff commented Nov 4, 2014 When I try to run brew install i get the following errors Error: /usr/local/Library/Homebrew/cmd/install.rb:22: syntax error, unexpected <<, expecting keyword_end <<<<<<< HEAD ^ /usr/local/Library/Homebrew/cmd/install.rb:25: syntax error, unexpected ===, expecting keyword_end ======= ^ /usr/local/Library/Homebrew/cmd/install.rb:27: syntax error, unexpected >> >>>>>>> 9be15185f48365c76575d762f53fe5bb92234c50 ^ /usr/local/Library/Homebrew/cmd/install.rb:150: syntax error, unexpected end-of-input, expecting keyword_end Please report this bug: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/Library/brew.rb:59:in `require?' /usr/local/Library/brew.rb:118:in `
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community https://github.com/Homebrew/legacy-homebrew/issues/33913 of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Bug in tutorial: syntax error, unexpected ':', expecting keyword_end up vote 8 down vote favorite 2 I am sorry for asking what may be a remedial question, but in learning rails i was trying http://stackoverflow.com/questions/17736811/bug-in-tutorial-syntax-error-unexpected-expecting-keyword-end to follow along note for note in this tutorial: http://guides.rubyonrails.org/getting_started.html#configuration-gotchas I am fie to section 5.7 - showing the results of the post, as instructed I add this line to routes.rb post GET /posts/:id(.:format) posts#show and the show method in posts_controller.rb: class PostsController < ApplicationController def new end def create @post = Post.new (post_params) @post.save redirect_to @post end def show @post = Post.find(params[:id]) end private def post_params params.require(:post).permit(:title, :text) end end my routes.rb file is Listing::Application.routes.draw do get "welcome/index" post GET /posts/:id(.:format) posts#show resources :posts # You can have the root of your site routed with "root" root 'welcome#index' end Here is the error: C:/Ruby-Projects/listing/config/routes.rb:4: syntax error, unexpected ':', expecting keyword_end post GET /posts/:id(.:format) posts#show ^ Rails.root: C:/Ruby-Projects/listing Application Trace | Framework Trace | Full Trace This error occurred while loading the following files: C:/Ruby-Projects/listing/config/routes.rb I am running rails 4.0, ruby 2.0 on 64 bit windows 8. Admittedly I don't know what that line in the routes.rb is
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn http://stackoverflow.com/questions/27511178/syntax-error-unexpected-keyword-end-expecting-end-of-input-except-the-syntax more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up syntax error, unexpected keyword_end, expecting end-of-input (except the syntax is actually syntax error okay…) [closed] up vote 0 down vote favorite I'm getting a syntax error with what you see below. What's weird is if I run: ruby -c controllers/posts_controller.rb I get back Syntax OK... I'm not sure exactly what's causing this to occur.. All of my definitions and classes are closed with "end" and from what I can tell it's all cased the same. What gives? Syntax Error: /home/action/workspace/zjmw00.5/app/controllers/posts_controller.rb:27: syntax syntax error unexpected error, unexpected keyword_end, expecting end-of-input posts_controller.rb class PostsController < ApplicationController def new end # Create a private definition to secure the post parameters and then link it to create. # Make sure all private definitions are at the bottom so that your others aren't private. def create @post = Post.new(post_params) @post.save redirect_to @post end def show @post = Post.find(params[:id]) end def index @post = Post.find(1, 2, 3) end private def post_params params.require(:post).permit(:title, :text) end end views/posts/index.html.erb
Listing posts
Title | Text |
---|---|
<%= post.title %> | <%= post.text %> |
Listing posts
Title | Text |
---|---|
<%= post.title %> | <%= post.text %> |