Closed augmen closed 7 years ago
@augmen I think you are not understanding what rake is. You don't have to setuprake
manually. It will be setup when you install rails.
You are getting the error because it's rake db:migrate
not rake db:create
. And also please don't run bundle commands using sudo
. Your first screenshot indicates you are running as root(root@socify
). Please create a user and install ruby and rails.
Looks like there is a mismatch between the bundler & ruby version of your system and the one specified in the Gemfile.
Try reinstalling ruby and rails. Use this https://gorails.com/setup/.
@augmen This looks like a config problem on your system. Since it's not anything specific to the app itself am closing this issue. Please feel free to ask any questions in this thread.
I am using the Ruby 2.3.1 & Rails 5.1.3. Ok i got it rake db:migrate
. You mean to create a sudo user
and then instal ROR as sudo user ? is yes then please guide us on the commands guide if possible ?
Thanks
@augmen You can create a sudo user. I was just saying don't install ruby/rails as the root user or use sudo commands for rails/bundler specific commands.
@scaffeinate what is the sudo command for the bundle install
? as i was getting error not to run bundle install
as root user.
@augmen You aren't supposed to run it as root
@scaffeinate So run with sudo command or run as sudo user ?
@augmen No just run without the sudo. And also not as the root user. Run it without any elevated privileges.
@scaffeinate i run it as bundle install
and got this
Please look @ bundle install command return. Any direct code
@augmen Can't you see root@soucify. You are clearly as the root
@scaffeinate Yes which directory to change ? as not root user ? Shall i try by creating sudo user ? like this The i creat new sudo user by running 👍 adduser swap2 su - swap2 i dropped into
swap2@soucify
but i didn't get into app as sudo user?
@augmen It's not the directory. You are logged in as the root user. Please create a new user and switch to it. Or did you use sudo su
?
@scaffeinate Got it . Create a sudo user and sudo su
then install ROR following the guide @ gorillas.com and then run bundle install
. Thanks
@augmen No. That's exactly what you aren't supposed to do. I asked you whether you did it to switch as the root user. Please create a new user(Not a root) then install ROR.
@scaffeinate to switch user i did -adduser - swap2
then su -swap2
to switch to non-root user. then sudo su
& cd
to switch to root user. As a non-root user you cannot cd socify
? therefore to run the bundle install
command inside the cd socify
you should use as root user !!. I am using the same gorails.com guide to setup the engine . Also tried the same with digital ocean one click ROR apps. But results are same.
@augmen I am not sure what issue you are facing. Maybe use this guide to set your server up: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04. And use this to install: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-16-04. It's a step-by-step tutorial to get it up and running :)
@augmen It's because you cloned the project as the root user and trying to access as a non-root user. Simple permission issue. I would suggest to go over the links and start over server setup. But it's up to you
ok i will try thanks appreciated
i switched to sudo user it looks like this.
then i tries to clone install socify as non-root user
git clone https://github.com/sudharti/socify
got error Permission denied ?
i still fail ? do you have copy of your script / source code that you can share . will use AWS elastic beanstalk to launch the code directly ?
@augmen I couldn't help but notice that you are trying to clone the project as a non-root user but in the /root directory(which is system directory and ofcourse restricted). I suggest you checkout the unix man-page first before trying to configure your env. And I don't have any script as such. All I had were the links I shared.
I succeeded & resolved the bundle install
. But could not get the app live in browser local hosts 3000 . I run the command rails serve
and got this
Localhost :rofl: :rofl:. Localhost indicates your local computer. https://en.wikipedia.org/wiki/Localhost. If you are starting on a server you need to access it through it's IP address or domain name if you have done a DNS mapping. I think it's best for you to read about web dev basics before trying to deploy.
After sucesfull installation of ROR and posgresQL : I have run the command 👍
git clone https://github.com/sudharti/socify cd socify bundle install
got this error
The i creat new sudo user by running 👍
adduser swap2
su - swap2
i dropped intoThan i tried to
cd socify
but didn't get itThen i run the above mentioned command as sudo user 👍
sudo apt install ruby-bundler
rake db:create
got this errorsudo apt install ruby-railties
i think i am going wrong . how to run the commands
bundle install
rake db:create
rails server
As sudo -user ? I hope that you got it.
I just added the rake gem
gem install rake
and run the commandbundle install
got this error
Try to install the rake from bundle install rake. But got this error
After installing rake and running the command
rake db:create
got this 👍Thanks