Vi mongod.conf gives error

Hi, i want to code along with the instructor.
Im able to connect to the database in the IDE provided in the previous learning activity using
mongo _port 27000 but then vi mongod.conf command shows error.
how to open the configuration file is not known to me, kindly help
regards manyu

Hi @Manyu_N_A, :wave: .
Can you post a screenshot of the command you executed and the error you got in return?

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer


hi Sourabh thanks for the reply.
kindly resolve the issue.

Hi @Manyu_N_A,
you cannot run vi from within the mongo shell
exit the mongo shell, then run the vi command (you can run the “exit” command to exit the mongo shell)
Thanks,
Rafael,

1 Like

hi Rafael thanks for the reply.
i did it out side the mongo shell as you said. now in get this error.!
Screenshot (833)

see this stackoverflow answer

https://stackoverflow.com/questions/13361729/found-a-swap-file-by-the-name#answer-51326724

Thanks,
Rafael

Thanks Rafael
I that was helpful.

I further need to ask that in the video the instructor is getting different out put than me if any one can explain the difference.
regards Manyu


You are not supposed to use vi to edit files in the IDE.

You are supposed to use the editor pane as shown in the lecture where the IDE is introduced.

I would Reset Workspace and use the IDE as intended.

1 Like

Hi Steeve
How can i find the editor pane

It is the pane above the terminal tabs pane and if the lab involves some files the will be already loaded in the editor tabs pane.

I think that is already explain in the lesson where the IDE is presented.

thanks steeve
i guess we are not on the same page, i am doing m 150 review and Q/A feedback lecture.
there its given to use the vi mongod.conf command to open the file mongod.conf:
i get different result than the instructor as i have mentioned earlier.
regards
manyu

Yes you are right. However your first screenshot were showing the IDE terminal. When working with the IDE you should stick to the lab instructions.

It is normal as the configuration file is specific to its installation which is different from what you might have on your computer or in the IDE.

Thanks Steeve
configuration file as well as the file structure might be the issue