Closed jesperlindstrom closed 8 years ago
@jesperlindstrom what problems did you have trying to run it yourself?
@lindskogen Can't start the Rails server for some reason. Works fine in other projects. I'm new to Rails/Ruby, so might have forgotten to do something. Getting this on rails s
:
$ rails s
bin/rails:6: warning: already initialized constant APP_PATH
/Users/jesper/Development/hubbIT/bin/rails:6: warning: previous definition of APP_PATH was here
Try this? rake rails:update:bin
from http://stackoverflow.com/a/23445914/823725
@lindskogen thanks, that resulted in some new errors but I managed to find a solution to those, which then fixed the "update:bin" part, which in turn fixed rails s
. Seems like it was related to OS X and MySQL somehow.
New problem though (haha), when trying to run the database migrations:
== 20150905130024 CreateTotalTimeView: migrating ==============================
-- execute(" CREATE VIEW users_total_time AS\n SELECT `id`, `user_id`, SUM(TIMESTAMPDIFF(SECOND, `start_time`, `end_time`)) as `total_time`\n FROM user_sessions GROUP BY `user_id` ORDER BY `total_time` DESC\n")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such column: SECOND: CREATE VIEW users_total_time AS
SELECT `id`, `user_id`, SUM(TIMESTAMPDIFF(SECOND, `start_time`, `end_time`)) as `total_time`
FROM user_sessions GROUP BY `user_id` ORDER BY `total_time` DESC
/Users/jesper/.rvm/gems/ruby-2.2.1/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:91:in `initialize'
Same problem as @Kalior, you're using sqlite3 instead of mysql
Yeah, apparently this project only supports mysql.
@lindskogen switched to MySQL and migrations went fine. New problem is that the auth part redirects to https://account.chalmers.it/?redirect_to=http://localhost:3000/
, but it doesn't take me back to localhost afterwards. Is it possible to get the auth part working with the local dev server, or can I disable it somehow?
Not sure about the redirect, but you can set up local.chalmers.it
to point to your local ip to get the cookie to work. (In your /etc/hosts
file)
I (somewhat) solved it by bypassing the auth and forcing a current_user
object haha. I mainly wanted to see the design as a whole anyway. Thanks for all the help! :)
Some fixes to #119 where some styles weren't properly applied and/or not overriding previous styles. Also some mobile optimization, primarily for the stats page.
Untested, since I can't run the Rails app locally.