-
Notifications
You must be signed in to change notification settings - Fork 7
Home
-
I get an error but when I look at my code I cannot see anything wrong with it. What should I do?
-
How do you fix the following error: "Expected string default value for '--rc'; got false (boolean)"?
A: You may be able to find the answer to your question in the FAQs for a previous course if you can't find it here.
Here are links to FAQs from previous courses
- [Course 4] (https://github.com/jhu-ep-coursera/fullstack-course4/wiki/Frequently-Asked-Questions-(FAQ))
- [Course 3 Module 3] (https://github.com/jhu-ep-coursera/fullstack-course3-module3/wiki)
- [Course 3 Module 2] (https://github.com/jhu-ep-coursera/fullstack-course3-module2/wiki)
- [Course 3 Module 1] (https://github.com/jhu-ep-coursera/fullstack-course3-module1/wiki)
- [Course 2 Module 4] (https://github.com/jhu-ep-coursera/fullstack-course2-module4-i-reviewed/wiki)
- [Course 2 Module 3] (https://github.com/jhu-ep-coursera/fullstack-course2-module3-blogposts/wiki)
- [Course 2 Module 2] (https://github.com/jhu-ep-coursera/fullstack-course2-module2-advanced-ar/wiki)
- [Course 2 Module 1] (https://github.com/jhu-ep-coursera/fullstack-course2-module1-fancy_cars/wiki)
- [Course 1 Module 3] (https://github.com/jhu-ep-coursera/fullstack-course1-module3/wiki)
- [Course 1 Module 2] (https://github.com/jhu-ep-coursera/fullstack-course1-module2/wiki)
- [Course 1 Module 1] (https://github.com/jhu-ep-coursera/fullstack-course1-module1/wiki)
A: [Here] (https://www.imagemagick.org/script/binary-releases.php#macosx) is a link to installing imagemagick 6 using MacPorts. Unfortunately Homebrew will only allow you to install version 7. There are workarounds to installing version 6 using Homebrew, but we haven't gotten any of them to work.
ImageMagic will not be necessary until Module 5. Prior to module 5 we will provide more info on a workaround for people who are only able to install version 7.
A: For the course, the supported Rails version is Rails 4.2.6. If you used Rails Installer to download Rails 5, you can follow these instructions to downgrade to 4.2.6.
gem uninstall rails
gem uninstall railties
An them install the version you will need:
gem install rails -v 4.2.6
If you have multiple versions of Rails installed, just add the version that you want to uninstall to the end of the command:
gem uninstall rails -v 4.2.6 # uninstall version 4.2.6
gem uninstall railties -v 4.2.6
A: When working in a new language or environment it can be easy to make a mistake with syntax or mistype a function name. After looking at the code shown in the lecture videos, and comparing it to your own, you swear there is nothing wrong with your code. Unfortunately, the Ruby interpreter "thinks" otherwise.
When this happens, and after you have given an earnest effort to try to spot the error, resort to getting the code from the course's git repository. You can use the code from the repository to compare to your own code. Upon comparison, look for typos, syntax errors, or missing lines.
Here's how to get the code from the course's git repository:
Sections of the course have a git tags associated with them containing the code used in the lectures. Running git tag
will list the available tags you can use.
-
From the command prompt, type:
git clone [email protected]:jhu-ep-coursera/capstone_demoapp.git courseRepo
(You may replacecourseRepo
with whatever string you like. -
A new directory has been created called
courseRepo
.cd
into that directory -
Checkout using the tag relevant to the lecture you are on. For instance, if you want to checkout the code for module2 then type the following
git checkout module2.start
- If you want to get a specific commit that was performed in module2, rather than getting the starting code, you can use the
git log
command to find that commit and check it out.
Here is an example section from git log:
commit 2a2eb5c2b2626d85bedf653c114e453f45791043
Author: jim [email protected]
Date: Sat Dec 3 17:42:26 2016 -0500
added pry-byebug
Now, you can use the value tied to "commit", shown in print out of the git log
command, to jump to that specific commit. In this case containing the code that includes the addition of pry-bybug:
git checkout 2a2eb5c2b2626d85bedf653c114e453f45791043
Remember, git clean -df
will remove files that are left over from latter branches, which might not be pertinent to earlier branches.
Q: How do you fix the following error: "Expected string default value for '--rc'; got false (boolean)"?
A: Adding the following entry in your Gemfile will stop this error from happening:
gem 'thor', '~>0.19', '<=0.19.1'
Once added into the Gemfile run bundle
again and try to run the rails server. If rails hangs after trying to run it, Ctrl+C
out of rails and try running spring stop
at the command prompt, then try running the rails server again.