How to run seed rb file on Amazon ec2

0 votes

Recently I hosted my Ruby on Rails application on Amazon EC2 using Elastic Beanstalk. Everything works fine except my seeds.rb file. My seeds.rb file is not executed at the time of hosting. I am using ActiveAdmin also and I define first admin on my seeds.rb file.

How can I create first admin user on Amazon by rails console? Is there any way to open Rails Console on Amazon EC2 ? I am trying to do this using putty but don't know how to do this. Please give me some pointers..

Mar 14, 2022 in Others by Edureka
• 13,670 points
388 views

1 answer to this question.

0 votes

To gain access to the Amazon instance, you must first construct a keypair (which I think you already have). Make that ssh access is enabled in the security group you've chosen. Then, assuming you're running the app in a staging environment, cd into the app directory and run bundle exec rake db:seed RAILS ENV='staging'.

answered Mar 24, 2022 by Edureka
• 13,670 points

Related Questions In Others

0 votes
1 answer

How to install a GUI on Amazon AWS EC2 or EMR with the Amazon AMI

The top-level script for installing the GUI ...READ MORE

answered Mar 9, 2022 in Others by gaurav
• 23,260 points
583 views
0 votes
1 answer

How to run C# code on Ubuntu

Hey @Abha, you can create and run ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
5,956 views
0 votes
1 answer

how to install Amazon AWS Command Line Interface tools on Bamboo build agent.

Hi@Abhishek, You need to set the following parameters ...READ MORE

answered Apr 6, 2020 in Others by MD
• 95,440 points
1,485 views
0 votes
1 answer

NodeJS Amazon AWS S3 getObject how to send file in API response to download

Server Side const aws = require('aws-sdk'); router.get('/getfilefroms3', async (req, ...READ MORE

answered Mar 24, 2022 in Others by gaurav
• 23,260 points
9,129 views
0 votes
0 answers

How to find the username of the instance launched in amazon-ec2?

I m having trouble connecting to the ...READ MORE

Apr 4, 2022 in Others by Kichu
• 19,050 points
1,037 views
0 votes
0 answers

How to find the username of the instance launched in amazon-ec2?

I m having trouble connecting to the ...READ MORE

Apr 5, 2022 in Others by Kichu
• 19,050 points
262 views
0 votes
1 answer

How to do Installation of Ruby on Rails on Linux (Ubuntu)?

Hi Pratibha, installing ROR on ubuntu is ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
1,554 views
0 votes
1 answer

Golang on Linux... How to install it?

Hey @Abhi, if you want to install ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
666 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
731 views
0 votes
1 answer

How to convert data from txt files to Excel files using python

Hi , there are few steps to ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,670 points
13,293 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP