So I'm working on a project in which we are doing Vue.js front end with docker and then Ruby on Rails backend.
I'm trying to locally get everything set up but the remote repository has the following:
- README.md
- frontend
- docker-compose.yml
- backend
Cool so the frontend and backend are separate folders. So I did the following:
- Created local folder = project
- Git init
- Git clone bitbucket line of code. Which created = new_project folder with the above items
- CD into backend and attempted = rails new project
Which ends up with: Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first. Type 'rails' for help.
I removed the git init on the project folder and made new_project folder the init. Then removed the backend directory. And then tried to create a new directory with rails app here. Same issue.
How do I build out that app in a directory that is sibling to frontend?
Update: Went ahead and started from the Desktop and did: mkdir new_project > cd new_project > rails new_project. Same issue.
Exact commands I used:
MacBook-Pro-4:project jacob$ cd backend
MacBook-Pro-4:backend jacob$ rails new new_project
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
mosers-MacBook-Pro-4:backend jacob.moore$ sudo gem install rails
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.
MacBook-Pro-4:backend jacob$ rvm use 2.2.2
Done installing documentation for concurrent-ruby, thread_safe, tzinfo, i18n, activesupport, mini_portile2, nokogiri, rails-dom-testing, crass, loofah, rails-html-sanitizer, erubi, builder, actionview, rack, rack-test, actionpack, sprockets, sprockets-rails, bundler, method_source, thor, railties, mimemagic, marcel, arel, activemodel, activerecord, activestorage, websocket-extensions, websocket-driver, nio4r, actioncable, globalid, activejob, mini_mime, mail, actionmailer, rails after 68 seconds
39 gems installed
MacBook-Pro-4:backend jacob$ rails new new_project
Can't initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
Type 'rails' for help.
Follow Up: I tried to straight up try and create an application on the Desktop and got the same issue. Pretty sure there's something in Desktop preventing this. Went to my Documents folder...no issue.