Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8735363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:02:12+00:00 2026-06-13T10:02:12+00:00

Ruby 1.9.3-p194 Rails 3.0.3 I was having libcrypt errors today, and after hours of

  • 0

Ruby 1.9.3-p194

Rails 3.0.3

I was having libcrypt errors today, and after hours of troubleshooting, I uninstalled rvm, ruby and gems. I reinstalled everything, but now my application throws errors. I made no changes to my code, but this worked fine before reinstallation:

ActionView::Template::Error (/home/username/apps/vits/app/views/layouts/application.html.erb:19: syntax error, unexpected ',', expecting ')'
if (current_user.admin == true, "Admin Menu", adminmenu_path...
/home/username/apps/vits/app/views/layouts/application.html.erb:19: syntax error, unexpected ',', expecting ')'
...er.admin == true, "Admin Menu", adminmenu_path) );@output_bu....
/home/username/apps/vits/app/views/layouts/application.html.erb:22: syntax error, unexpected keyword_do_block, expecting keyword_end
');@output_buffer.append_if_string=  flash.each do |name, msg|
/home/username/apps/vits/app/views/layouts/application.html.erb:22: syntax error, unexpected '|', expecting '='
');@output_buffer.append_if_string=  flash.each do |name, msg|
/home/username/apps/vits/app/views/layouts/application.html.erb:44: syntax error, unexpected keyword_ensure, expecting $end):
16:     <div id="header">
17:             <div class="wrap clear">                        
18:                 <% if current_user %>  
19:                     <%= link_to "Logout", logout_path %>  |  <%= link_to "Main Menu", usermenu_path %>  |  <%= link_to_if (current_user.admin == true, "Admin Menu", adminmenu_path) %>
20:                 <% end %>
21:             </div>
22: <%- flash.each do |name, msg| -%>
app/controllers/user_sessions_controller.rb:29:in `new'

Any ideas? This is a bad RoR day for me.
Thanks in advance. -Katie

Edited to add entire application.html.erb:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title><%= h(yield(:title) || "Vendor Invoice Tracking System (VITS)") %></title>
    <link rel="stylesheet" href="stylesheets/scaffold.css" type="text/css" media="all" charset="utf-8" />
    <%= stylesheet_link_tag 'scaffold' %>
    <%= javascript_include_tag :defaults %>
    <%= javascript_include_tag "tablesort.js" %>
  </head>

  <body>
    <div id="siteholder">

    <div id="header">
            <div class="wrap clear">                        
                <% if current_user %>  
                    <%= link_to "Logout", logout_path %>  |  <%= link_to "Main Menu", usermenu_path %>  |  <%= link_to_if ((current_user.admin == true, "Admin Menu", adminmenu_path)) %>
                <% end %>
            </div>
<%- flash.each do |name, msg| -%>
<%= content_tag :div, msg, :id => "flash_#{name}" %></p>
<div class="clear"></div>
<%- end -%> 

        <% if current_user %>       
            <div id="content1">             
                <%= yield %>
            </div>

        <% else %>

            <div id="content">
                <div id="content1">
                </div>
                <%= yield %>
            </div>
        <% end %>

    </div>
  </body>
</html>'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T10:02:13+00:00Added an answer on June 13, 2026 at 10:02 am

    I think the problem is this line:

    <%= link_to_if (current_user.admin == true, "Admin Menu", adminmenu_path) %>
    

    You don’t need the == true, just:

    <%= link_to_if (current_user.admin, "Admin Menu", adminmenu_path) %>
    

    Will be fine. If for some reason you did need check equality, you’d need an extra pair of parentheses, e.g.:

    <%= link_to_if ((current_user.role == "admin"), "Admin Menu", adminmenu_path) %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Ruby On Rails 3 and Webrick issue $ rails server /Users/Vineeth/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require':
I'm on mac osx, rails 3.2.3, ruby 1.9.3-p194, spree 1.1.0, rvm 1.10.2. ImageMagick was
I'm using rvm 1.15.6 and ruby-1.9.3-p194. I've created a new Rails application with the
Environment - rvm ruby - rubies/ruby-1.9.3-p194/bin/ruby I am trying to create a new rails
When trying to start rails console I keep getting the following error Users/rigelstpierre/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `require':
ruby -v give me ruby-1.9.3-p194. which ruby gives /home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/bin/ruby rails -v gives Rails 3.2.7
I am using following gems and ruby-1.9.3-p194 : rails 3.2.3 rspec-rails 2.9.0 spork 1.0.0rc2
Why am I receiving this Rake error: $ rake --version /Volumes/Data/sampablokuper/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not
I installed ruby 1.9.3 w/ rubyinstaller-1.9.3-p194.exe, and then installed RubyMine right after, as per
/usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning: already initialized constant ANY /usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning: already initialized constant UTF8 /usr/share/ruby-rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux/psych.so: warning:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.