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 6566569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:13:56+00:00 2026-05-25T14:13:56+00:00

I get a RoutingError whenever a username has an @ symbol in it: No

  • 0

I get a RoutingError whenever a username has an @ symbol in it:

No route matches {:controller=>"users", :action=>"show", :username=>"abc@shin.com"}

My routes looks like this:

match 'users/:username' => 'users#show', :as => :show_other_user

And my view:

<% for user in @users %>
  <tr>
    <td><%= image_tag avatar_url(user, 50) %></td>
    <td><%= link_to user.name, show_other_user_path(:username => user.username) %></td>
    <td><%= common_friends(current_user, user).size %></td>
  </tr>
<% end %>

Everything works find if the username doesn’t have the @ symbol.

  • 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-05-25T14:13:57+00:00Added an answer on May 25, 2026 at 2:13 pm

    Your route isn’t breaking because of the @, it is breaking because of the .. Rails will see the . and think you’re trying to specify a format (i.e. .html, .xml, …). You need to kludge around the auto-format detection stuff a little bit by updating your route with something like this:

    match 'users/:username' => 'users#show', :as => :show_other_user, :constraints => { :username => /.*/ }
    

    The :constraints should sort out your routing problems (you’d use :requirements for Rails 2).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Standard new rails app has issue showing the rails.png ActionController::RoutingError (No route matches [GET]
I am getting ActionController::RoutingError (No route matches [POST] /users/sign_up): when I click on this
I have the following routes in my app: GET /admin/comments(.:format) {:controller=>admin/comments, :action=>index} admin_comments POST
Using Rails 3.0.3. I have the following route in routes.rb: match user/create_new_password/:reset_password_key =>users#create_new_password, :via=>[:get,
I'm trying to redirect users that login to their profile page but get the
I get this routing error when loading the page: ActionController::RoutingError in Videos#index Showing /rubyprograms/dreamstill/app/views/layouts/application.html.erb
I am creating an RSS feed. I get this error in view: ActionController::RoutingError in
I am creating request specs following the Railscast at http://railscasts.com/episodes/257-request-specs-and-capybara In my application, users
using this example on dynamic list https://github.com/sandeepleo11/Dynamic-Select-Menus-in-Rails-3 I managed to get dynamic select in
I get a this eror when visit the url http://localhost:3000/admin/login : ActionController::RoutingError in Admin/login#index

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.