-
Notifications
You must be signed in to change notification settings - Fork 7
Home
- How can I install imagemagick 6 on macOS?
- How to downgrade from Rails 5?
- What is the default Postgres password?
-
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)"?
-
How to handle attach_file related tests failing using poltergeist on Ubuntu 16.04
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
In Linux and MacOS X postgres is configured by default to only allow the user 'postgres' to connect to the Postgres database. This way of authentication is managed by a file called 'pg_hba.conf', which is located in /var/lib/pgsql/9.3/data (NOTE: In this example, the 9.3 is the specific version of postgres).
Run the following command to become user postgres: sudo -u postgres psql
Then, at the postgres command prompt, enter the following
postgres=> alter user postgres password 'apassword'; postgres=> create user your_username createdb createuser password 'somepass'; postgres=> create database your_username owner your_username; postgres=> \q
Please update your_username with the username you would like to use. This will now give you the ability to login to Postgres as yourself and connect with the password you supply.
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.
A: If you execute a command that causes the terminal to timeout or just hang without doing anything, Ctrl+C
, or if that doesn't work just kill the process. Then try running spring stop
, then re-run your command.
A: For a detailed discussion of this issue, check out this thread.
The gist of it is that this issue is caused by the Ubuntu 16.04 installation of PhantomJS. Since there's currently not a fix for this problem, you can use the Selenium driver instead. Add Capybara.javascript_driver = :selenium
to the top of the files where you're having problems below the require
s.