Hi everyone! This is Mahdi from Tunisia. I am the new intern at Interfirm!
I'm writing this right after the first day of my internship. I am very optimistic about my future with Interfirm after experiencing such an amazing first day!
Everyone has been really kind, fun and helpful to me. I really loved the friendly atmosphere in the office.
My first project
While setting up my development environment to tackle my first project, I ran into quite a few problems (as expected!)
I turned out that 'libv8' is the interface for the V8 Engine used by therubyracer, and that there was an easy way to install 'libv8' using the system's V8 Engine:
(solution found here:
rubygems - Installing libv8 gem on Mavericks - Stack Overflow
gem install libv8 [-v YOUR_VERSION] -- --with-system-v8
or for bundler (to be added in the Gemfile):
bundle config build.libv8 --with-system-v8
If that doesn't work, please try installing v8 with homebrew and then retrying the above commands:
brew install v8
It is important to note that it simply might not work until you update your ruby version. In my case, the system-provided "ruby-2.0.0p481" was not enough, pushing me to resort to installing "ruby-2.1.1" (also known as "ruby-2.1.1p76")
Application configuration variables can be set in the file "project/config/application.yml", so in this case it is easy to specify the connection details variables:
PROJECT_USERNAME: "" PROJECT_PASSWORD: "" PROJECT_SOCKET: "/tmp/mysql.sock"
then, they could be used in "project/config/database.yml" through the ENV array:
default: &default adapter: mysql2 encoding: utf8 pool: 5 username: <%= ENV['PROJECT_USERNAME'] %> password: <%= ENV['PROJECT_PASSWORD'] %> host: 127.0.0.1 socket: <%= ENV['PROJECT_SOCKET'] %>
This is a really practical method, as I used to specify the login details in the database.yml file directly in the past.
The solution to this, was an easy (but probably inconvenient) removal or commenting of the gem 'spring' in the Gemfile. I'll leave it to you to find a better solution!
That's it for today! I had so much fun and I would like to thank everyone at Interfirm for the opportunity, and for getting to work with such great people!