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,690 points
658 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,690 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
1,041 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
6,462 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,460 points
1,852 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,757 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,040 points
1,519 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,040 points
545 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,896 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
986 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,690 points
1,053 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,690 points
14,026 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