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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:42:11+00:00 2026-05-16T14:42:11+00:00

I am tired of asking unanswered questions when using many outdated plugins / gems,

  • 0

I am tired of asking unanswered questions when using many outdated plugins / gems, and sometimes they don’t really work how I really wanted.

So my question is simple:

If I was a PHP programmer, and Rails was my first framework, what do I need to learn next so I can depend on myself when working with troublesome plugins or code snippets or tutorials?

I used to be quite good with an (rather silly now that I know MVC) e-commerce system in PHP, and normally I would just go ahead and read out the plugin’s code to find out what it does, but apparently doing so is extremely hard in Ruby on Rails, should I keep doing it, or am I going the right track? (I did learn by the way, but in very slow pace compared when I was still using PHP and that “e-commerce framework”)

  • 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-16T14:42:11+00:00Added an answer on May 16, 2026 at 2:42 pm

    This is like a generic programming question for me. If you have any troubles with some Rails plugin, you can always debug its code with a bunch of hardcore or easy methods, try to understand and fix the error. The question is, which methods should you use in particular situations.

    I will give you a little example. When you are debugging your Rails application, always check either logs/production.log or logs/development.log (depending on mode you’re working) for errors of any kinds. Every error in Ruby/Rails is represented by a huge stack-trace that you should read from top to bottom. Like this one:

    Processing CommentsController#create (for ***.***.***.171 at 2010-08-27 03:31:29) [POST]
      Parameters: {"authenticity_token"=>"[STRIPPED]"}, "last_comment_id"=>"0", "original_controller"=>"projects", "thread"=>"true", "thread_id"=>"Conversation_31", "commit"=>"Save", "_"=>"", "controller"=>"comments", "action"=>"create", "conversation_id"=>"31"}
    Sent mail to email@email.com
    
    ArgumentError (invalid byte sequence in UTF-8):
      /usr/lib/ruby/1.9.1/net/protocol.rb:294:in `slice!'
      /usr/lib/ruby/1.9.1/net/protocol.rb:294:in `each_crlf_line'
      /usr/lib/ruby/1.9.1/net/protocol.rb:236:in `write_message_0'
      /usr/lib/ruby/1.9.1/net/protocol.rb:250:in `block (2 levels) in write_message'
      /usr/lib/ruby/1.9.1/net/protocol.rb:280:in `using_each_crlf_line'
      /usr/lib/ruby/1.9.1/net/protocol.rb:250:in `block in write_message'
      /usr/lib/ruby/1.9.1/net/protocol.rb:169:in `writing'
      /usr/lib/ruby/1.9.1/net/protocol.rb:249:in `write_message'
      /usr/lib/ruby/1.9.1/net/smtp.rb:878:in `block in data'
      /usr/lib/ruby/1.9.1/net/smtp.rb:921:in `critical'
      /usr/lib/ruby/1.9.1/net/smtp.rb:875:in `data'
      /usr/lib/ruby/1.9.1/net/smtp.rb:655:in `send_message'
      actionmailer (2.3.8) lib/action_mailer/base.rb:684:in `block in perform_delivery_smtp'
      /usr/lib/ruby/1.9.1/net/smtp.rb:526:in `start'
      actionmailer (2.3.8) lib/action_mailer/base.rb:682:in `perform_delivery_smtp'
      actionmailer (2.3.8) lib/action_mailer/base.rb:523:in `deliver!'
      actionmailer (2.3.8) lib/action_mailer/base.rb:395:in `method_missing'
      app/models/emailer.rb:89:in `send_with_language'
      app/models/conversation.rb:51:in `block in notify_new_comment'
      app/models/conversation.rb:47:in `each'
      app/models/conversation.rb:47:in `notify_new_comment'
      ...
    

    Here we are! The line ArgumentError (invalid byte sequence in UTF-8):, on the very top of this trace, always tells us the error type. It’s an argument error!

    After that, look at the next line: /usr/lib/ruby/1.9.1/net/protocol.rb:294:in 'slice!'. It tells where the exception (ArgumentError) was raised in the following format:

     /path/to/file/:line:in `method_name'`
    

    Let’s open that neglectful file and find the source around that line:

    def each_crlf_line(src)
        buffer_filling(@wbuf, src) do
            while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n)
                yield line.chomp("\n") + "\r\n"
            end
        end
    end
    

    The error is on the following line:

    while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n)
    

    From this point we know where the error is and only need to fix it, but this process is out of scope of my short story. I just wanted to show you how to work with errors in Rails.

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

Sidebar

Related Questions

Sorry asking so many questions but believe me.. I tried Google first. :) When
I know there are many questions asking for this, but I have tried quite
I'm really tired of typing my_ar_object.errors.full_messages in my console when i'm testing things... So,
I'm using Janus (isn't pivotal to understand the question though). Basically what they do,
I am asking my question after I have tried many ways to solve it
I have tried refraining from asking for help, but I have had enough! I
I've tried to simplify for the purposes of asking this question. Hopefully, this will
Firstly I tried to get fabric working, but it kept asking me for a
I tired my hands on bazaar(launchpad), for the reason that i can host my
I am getting tired of manually installing javax jar files in Maven and would

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.