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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:26:18+00:00 2026-06-14T18:26:18+00:00

.worker file runtime ruby name UserMailer merge_gem activerecord, =3.2.8 merge_gem ‘actionmailer’, ‘=3.2.8’ merge_gem ‘devise’,

  • 0

.worker file

runtime "ruby"
name "UserMailer"
merge_gem "activerecord", "=3.2.8"
merge_gem 'actionmailer', '=3.2.8'
merge_gem 'devise', '=2.1.2'
merge_gem 'pg', "=0.14.0"
merge_file "../app/views/user_mailer/new_user.html.erb" , "user_mailer"
merge_file "../app/mailers/user_mailer.rb"
merge_dir "../app/models"
merge_exec "user_mailer_worker.rb"

.rb file

require 'action_mailer' 
require 'active_record' 
require 'pg'
require 'bcrypt'
require 'devise'
require 'user_mailer.rb'
require 'models/user.rb' 

def init_mailer
  #Need to convert to proper hashes
  mailer_config = params['mailer'].inject({}) { |memo, (k, v)| memo[k.to_sym] = v; memo }
  # set default views dir to current dir
  ActionMailer::Base.prepend_view_path('.')
  ActionMailer::Base.smtp_settings = mailer_config
  ActionMailer::Base.delivery_method = :smtp
end

def setup_database
  puts "Database connection details:#{params['database'].inspect}"
  return unless params['database']
  # estabilsh database connection
  ActiveRecord::Base.establish_connection(params['database'])
end

init_mailer
setup_database
puts "I got '#{params.inspect}' parameters"
#send email!
# you could use here any active_record queries with models
UserMailer.new_user(User.find(params[:id])).deliver!

I have uploaded code to iron worker but i got following output

Skipping ruby gem with name='pg' and version='0.14.0' as it contains native extensions, switching to full remote build should fix this

and after i queue task on iron.io i got error

/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- pg (LoadError)
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /task/user_mailer_worker.rb:4:in `<top (required)>'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from __runner__.rb:190:in `<main>'

how to require ‘pg’ gem on iron.io ??

  • 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-14T18:26:19+00:00Added an answer on June 14, 2026 at 6:26 pm

    Add this line to .worker file:

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

Sidebar

Related Questions

Co-worker is sure he checked in a file: foo_oustanding.dpr but isn't sure when/where (we
I am generating a CSV file on the fly/runtime with JSF and the code
My code worked fine when it was all in one file. Now, I'm splitting
I have a file download code in my site which worked perfectly fine untill
The following code worked fine in IE7 until I started using IE9.js file. The
Im submitting Data to a php file via AJAX using POST. It worked fine
I have two string variables which are both file paths. The code that worked
In my web worker I have a line where I set the onmessage handler
My co-worker and I developed two apps in parallel, each with similar styling. The
I have a worker method with an optional parameter Work(string input = DefaultInput) {

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.