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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:34:34+00:00 2026-06-15T12:34:34+00:00

I have some rspec tests in RubyMine, they works perfect, when I run them

  • 0

I have some rspec tests in RubyMine, they works perfect, when I run them from RubyMine interface.
But when I try to run same test from terminal, they fail.
I use ruby-gmail gem to send mail trougth gmail using this construction:

@gmail.deliver do
        to current_unread_mail.reply_to
        subject "Re: " + current_unread_mail.title
        body reply_body
end

It’s successfully send mail if I run from RubyMine, but didn’t send mail (but not raising any kind of exception) when I run my rspec like this

rspec test_spec.rb

So I think the reason for this, that RubyMine add some additional rspec parameters, when it runs.

First line in Rspec output in RubyMine is something like this:

/home/user/.rvm/rubies/ruby-1.9.2-p318/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/user/.rvm/gems/ruby-1.9.2-p318@global/bin/rspec /home/user/path_to_spec/test_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter

But If I run this code from terminal I got error

bash: syntax error near unexpected token `$0=ARGV.shift'

What can I do?

  • 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-15T12:34:35+00:00Added an answer on June 15, 2026 at 12:34 pm

    Found a problem.
    I used a Ruby-Gmail gem, but when I switched for Gmail gem (fork of Ruby-Gmail) and changes syntax to

    email = @gmail.compose do
     to (current_unread_mail.reply_to.mailbox + '@' + current_unread_mail.reply_to.host).to_s
     subject "Re: " + current_unread_mail.title
     body reply_body
    end
    email.deliver!
    

    It works fine for me.

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

Sidebar

Related Questions

I have been writing some rspec tests, and right now I want to verify
In some Rspec model specs, we have several tests like this: it { should
I have the following classes in Rails and am writing some rspec tests (any
Some of my Rspec tests have gotten really really big (2000-5000 lines). I am
I have some RSpec tests for my models and I would like to turn
I'm trying to keep my specs clean and DRY, but I have some tests
So I'm writing some rspec tests and I'm embarrassed at my lack of Ruby
I have a Rakefile that looks like this: require 'rspec/core/rake_task' desc Run all RSpec
I have started writing tests using Rspec for a really old project. The models
I have forked a ruby gem and made some updates. I need to run

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.