Wiki Forum Sign up! Explore Home

Not signed in (Sign In)

LiveSearch

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.2 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorraz
    • CommentTimeJun 29th 2008
     permalink
    I have installed clockingIT on my company's web server. It's running Ubuntu / Nginx / Mongrels. Let me just say this is one of the best application I've seen for project management. Back to my question. I try and sign up a new user (myself) for the company's site. I enter all the information into the sign up form. When I submit the next page is a
    "Page Load Error"

    Address Not Found
    Firefox can't find the server at ra.websitename.com.

    The browser could not find the host server for the provided address.

    * Did you make a mistake when typing the domain? (e.g. "ww.mozilla.org" instead of "www.mozilla.org")
    * Are you certain this domain address exists? Its registration may have expired.
    * Are you unable to browse other sites? Check your network connection and DNS server settings.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing.

    I think nginx is not creating the sub-domain or I have a wrong setting somewhere. When I go back to the web site i get this error "Error sending registration email. Account still created." Please help! This my first time deploying a Ruby on Rails Application. I can provide any other information you may need to solve my little problem. Thank you. Please keep up the great work.
    • CommentAuthoradmin
    • CommentTimeJun 29th 2008
     permalink
    Glad you like ClockingIT!

    Have you added ra.websitename.com to DNS or the hosts file of the machine you're browsing from? Have you added the wanted subdomain to the Nginx configuration? Can you access the mongrels directly on port 3000 or whatever port you've configured them to use? Does 'ping ra.websitename.com' work?

    The email error meant that something went wrong when sending out the registration email, probably due to the mailer settings in config/environment.rb being wrong.

    Could I ask how many users you're trying to support?

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJun 29th 2008
     permalink
    I have not added the wanted subdomain to Nginx or setup the DNS/host file. If I just setup the DNS, do I have to setup the Host file for every machine that is going to work with clockingit? Pinging ra.website.com doesn't work. I believe I can access mongrels directly, I have them setup on ports 5000 - 5002. I'll take a look at my email setting in config/environment.rb.


    Its going to support about 15 right off the bat. After its up and running for a bit, we're going to roll it out to everyone. That about 100 people.

    Thanks for the help. I'll setup the wanted subdomain in my DNS and in Nginx config file. For the subdomain setup in Nginx where should I point the root directory, just the cit folder?
    • CommentAuthoradmin
    • CommentTimeJun 29th 2008
     permalink
    You'll need some way for your users' browsers to resolve ra.website.com to the proper machine/ip, so either DNS or a hosts-file override on every computer. I'd go with DNS if it's possible. :-)

    part of my nginx.conf:
    server {
    listen 80 default;
    server_name .clockingit.com;
    client_max_body_size 50M;

    access_log logs/clockingit.log main;

    location ^~ /store {
    internal;
    root /usr/local/www/apps/clockingit/releases/git;
    }

    location ~* ^.+\.(jpg|jpeg|gif|png|css|js|ico|swf)$ {
    root /usr/local/www/apps/clockingit/current/public;
    expires 30d;
    }

    location ~* ^.+\.(jpg|jpeg|gif|png|css|js|ico|swf)\?\d+$ {
    root /usr/local/www/apps/clockingit/current/public;
    expires 30d;
    }

    location / {
    proxy_pass http://cit;
    include proxy.conf;
    }

    location ~ /\.ht {
    deny all;
    }
    }


    proxy.conf:

    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 50m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;


    Hope that helps.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJun 29th 2008
     permalink
    Thanks, I went with the DNS setup. That worked great. But I'm getting the following error. I try in login after that, this is what I see.

    LoadError in ActivitiesController#list
    Expected /home/raz/public_html/clockingit/cit/app/models/task.rb to define Task
    RAILS_ROOT: /home/raz/public_html/clockingit/cit

    I think I have something setup wrong. Here is the application trace error.

    vendor/rails/activesupport/lib/active_support/dependencies.rb:249:in `load_missing_constant'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:453:in `const_missing'
    vendor/rails/activesupport/lib/active_support/dependencies.rb:465:in `const_missing'
    vendor/rails/activerecord/lib/active_record/base.rb:1748:in `compute_type'
    vendor/rails/activerecord/lib/active_record/reflection.rb:125:in `send'
    vendor/rails/activerecord/lib/active_record/reflection.rb:125:in `klass'
    vendor/rails/activerecord/lib/active_record/associations.rb:1561:in `initialize'
    vendor/rails/activerecord/lib/active_record/associations.rb:1459:in `new'
    vendor/rails/activerecord/lib/active_record/associations.rb:1459:in `build_join_association'
    vendor/rails/activerecord/lib/active_record/associations.rb:1442:in `build'
    vendor/rails/activerecord/lib/active_record/associations.rb:1445:in `build'
    vendor/rails/activerecord/lib/active_record/associations.rb:1444:in `each'
    vendor/rails/activerecord/lib/active_record/associations.rb:1444:in `build'
    vendor/rails/activerecord/lib/active_record/associations.rb:1385:in `initialize'
    vendor/rails/activerecord/lib/active_record/associations.rb:1123:in `new'
    vendor/rails/activerecord/lib/active_record/associations.rb:1123:in `find_with_associations'
    vendor/rails/activerecord/lib/active_record/associations.rb:1122:in `catch'
    vendor/rails/activerecord/lib/active_record/associations.rb:1122:in `find_with_associations'
    vendor/rails/activerecord/lib/active_record/base.rb:1232:in `find_every'
    vendor/rails/activerecord/lib/active_record/base.rb:1227:in `find_initial'
    vendor/rails/activerecord/lib/active_record/base.rb:502:in `find'
    app/controllers/application.rb:62:in `current_sheet'
    app/controllers/application.rb:152:in `authorize'
    /usr/bin/mongrel_rails:19:in `load'
    /usr/bin/mongrel_rails:19
    • CommentAuthoradmin
    • CommentTimeJun 29th 2008
     permalink
    Please grab the latest snapshot / git version if possible, run

    rake db:migrate
    rake asset:packager:build_all
    rake locale:restore


    and possibly
    ruby ./setup.rb
    to verify dependencies.

    I think you might be running cit-0.99.3.tgz from a few days ago, which was just a test at building a new release and not tested or verified to work. :-)

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJun 29th 2008 edited
     permalink
    That Worked!!! Smokin' Awesome. Thank you.

    Just one error

    Unable to connect to push server...

    How can I setup without the .com:3000? I would just have to setup nginx / mongrels right? I guess i'm trying to say projects.website.com no :3000(port).
    • CommentAuthoradmin
    • CommentTimeJun 29th 2008
     permalink
    Have you configured the push server? (config/juggernaut_config.yml) - it's not quite as intuitive as it should be, but in your case something like:


    #-------------------- Push Server Configuration ---------------------------#
    #This is the port that the push server will be on.
    PUSH_PORT: "443"

    #This is the host that the push server will be on.
    #Usually it would be 0.0.0.0
    PUSH_HOST: "0.0.0.0"

    #This should be the url as seen from the browser.
    #Flash's xmlsocket can only connect to addresses in the same domain
    #or subdomain. For example, if people access your app from www.test.com than this
    #should be "test". Omit the port number and the 'http://'.
    PUSH_HELPER_HOST: "rb.website.com"

    #This is a 'secret' send by the broadcaster to validate identity.
    PUSH_SECRET: "cit57asdasdasd"

    #This must be the host that your crossdomain policy is located at
    CROSSDOMAIN: "xmlsocket://rb.website.com:443"

    #Allow crossdomain requests from where?
    ALLOW_CROSSDOMAIN: "*.website.com"


    Also make sure you're running the push server:

    nohup ruby ./script/push_server.rb

    (as root, if using port 443)

    To skip the :3000 you'd have to go through some proxy/balancer thingie, or go with mod_rails instead, yes.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 2nd 2008
     permalink
    I'm still have trouble connecting to the push server. I'm running ubuntu server 8.04.

    When I enter: nohup ruby ./script/push_server.rb the server just "hangs" and I can not run another command with ending the push_server script or mongrel that start by typing in ruby script/server.

    Is there a way to run two command from the same command line?
    • CommentAuthoradmin
    • CommentTimeJul 2nd 2008
     permalink
    Sorry, I meant nohup ruby ./script/push_server & note the missing & at the end.

    Other options are programs like 'screen' which let you run many console terminals inside one, and detach/attach them when you want from whatever machine you log in from.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 3rd 2008
     permalink
    Thanks, works great.

    Is there a command that can auto run/auto start the push server & ferret server?

    Now that I have it running. I want to get it work without ruby script/server.
    • CommentAuthoradmin
    • CommentTimeJul 3rd 2008
     permalink
    Auto-starting those would require you either install and setup God/Monit/Some other monitoring soultion and auto-start that, or write some init scripts which depend on your OS.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    FYI - This application is awesome! Everyone is now using clockingit and they love it. Just a couple of things. I still having trouble connecting to the push server. I had is working with it just stopped. My COO wants to print out the ganett chart, but is not printing right of him. Any ideas on printing off the ganett chart. What would be the best way to back up this application?

    Again thank you for this application and for all the help.
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    If you telnet from your local machine to the push server port what happens?

    Printing the GANTT is on my list, just need to figure out a way to make it look nice.

    The best way to backup, would be to dump the database (mysqldump) and backup the store directory to get the files as well.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    Ok i'll to telnet into the push server port. Is it a problem if our push server port it going over port 80?
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    If you're not running anything else on port 80, no. Port 80 is usually used for web, though, so unless you've got a dedicated server for the push server it might already be taken.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    Ok so that is my problem. becase everything is on one server. I'll try and change the push server to another port. should i move the push server to port 443 or something?
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    Unless you use SSL (https), you can use port 443. Or 1443, or 5001, or whatever, as long as it's not taken, and your users can reach it (ie. not blocked by any firewall)

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    Thank you again. I talk to my "system guy" when he comes in just to make sure. I'll let you know what happens.
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    Ok so i made the change in the juggernaut_config.yml file push_port "5001'. and still I can't connect to the push server. and the push_host set to the computers ip address.
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    And you've restarted your application?

    If you view the source of a page, close to the bottom you'll find a line like :
    new Juggernaut({ host:'subdomain.clockingit.com', port: 1863,....

    What's your look like?

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    bottom on the site

    <script type="text/javascript">
    //<![CDATA[
    new PeriodicalExecuter(function() {new Ajax.Request('/tasks/update_sheet_info', {asynchronous:true, evalScripts:true})}, 90)
    //]]>
    </script>
    <script type="text/javascript">
    juggernautInit();
    </script>
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
    WIDTH="1" HEIGHT="1" id="myFlash" name="myFlash">
    <PARAM NAME=movie VALUE="/socket_server.swf?host=projects.egefcu.org&port=5001&crossdomain=xmlsocket://projects.egefcu.org:80&juggernaut_data=%22info_1%22%2C%22user_1%22%2C%22channel_passive_2%22%2C%22activity_1%22%2C%22tasks_1%22"> <PARAM NAME=quality VALUE=high>
    <EMBED src="/socket_server.swf?host=projects.egefcu.org&port=5001&crossdomain=xmlsocket://projects.egefcu.org:80&juggernaut_data=%22info_1%22%2C%22user_1%22%2C%22channel_passive_2%22%2C%22activity_1%22%2C%22tasks_1%22" quality=high WIDTH="1" HEIGHT="1" NAME="myFlash" swLiveConnect="true" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>

    <script type="text/javascript" language="javascript" charset="utf-8">
    // <![CDATA[
    var userId=1;
    Event.observe(window, "load", function(e) {

    makeTooltips(1);




    Event.observe($('presence-toggle-users'), "click", function(ev) {
    toggleChatPopupEvent(ev);
    });
    });

    new Form.Element.Observer('worklog_body', 2, function(element, value) {new Ajax.Updater('worklog-saved', '/tasks/updatelog', {asynchronous:true, evalScripts:true, parameters: Form.serialize($('worklog_form')) })});

    // ]]>
    </script>

    </body>
    </html>
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    You need to update he crossdomain/xmlsocket line as well, as that still goes to port 80.

    (Or upgrade to the git version, as that's rewritten the whole thing)

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 15th 2008
     permalink
    where do i change the crossdomain/xmlsocket i forget where that is.
    • CommentAuthoradmin
    • CommentTimeJul 15th 2008
     permalink
    Same file as the juggernaut port. config/juggernaut_config.yml

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 16th 2008
     permalink
    man.. still having no luck connecting to the push server. I have done everything. I'll keep trying.

    Again thank for the help
    • CommentAuthorraz
    • CommentTimeJul 25th 2008
     permalink
    So do the push server and the crossdomain/xmlsocket have to be on the same port. I need to get it working tomorrow morning. We are training the CEO on the system. I know I had it working, then it just stopped.
    • CommentAuthoradmin
    • CommentTimeJul 25th 2008
     permalink
    If you run the latest Git version, pretty much the only thing you have to change in the juggernaut_config.yml is the PUSH_PORT.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 25th 2008
     permalink
    Ok. I have information a lot of database in the database. I don't want to do something that is going to mess up any data. So what would be the command to get the last git version?
    • CommentAuthoradmin
    • CommentTimeJul 25th 2008
     permalink

    git checkout db/schema.rb
    git pull
    rake db:migrate
    rake asset:packager:build_all


    (restart apaches/mongrels/thins/whatevers)

    As long as you don't have any conflicts the procedure should work without problems. As I run all migrations on my hosted version as well, I try to make very sure that they don't break any data.

    -- Erlend
    • CommentAuthorari
    • CommentTimeJul 27th 2008
     permalink
    I tried to upgrade our install of clockingIT with "rake db:migrate" as suggested but get the following error:

    <code>/usr/local/www/clockingit # rake db:migrate
    (in /usr/local/www/clockingit)
    rake aborted!
    Access denied for user 'cit'@'localhost' (using password: YES)
    </code>

    config/database.yml contains three setups. None of them even have a username of 'cit', so where is the upgrade script getting the login credentials from?
    • CommentAuthoradmin
    • CommentTimeJul 27th 2008
     permalink
    Have you looked at the file, just to make sure? config/database.yml is the only place where database credentials are set. Maybe someone ran setup.rb and overwrote your config?

    -- Erlend
    • CommentAuthoradmin
    • CommentTimeJul 27th 2008
     permalink
    What happens if you try
    ./script/console

    -- Erlend
    • CommentAuthorari
    • CommentTimeJul 27th 2008
     permalink
    Ah, got it. There are three databases defined there and I was misreading the database name for the username. Sorry about that. But it is using the wrong definition. How do I get ruby/rails/cit to switch between the production/test/development databases when running things like "rake db:migrate"?

    I can fudge it in the short term by making them all the same, but I'm guessing there is some neat way to switch between them in your code.
    • CommentAuthoradmin
    • CommentTimeJul 27th 2008
     permalink
    Something like this should do:

    rake db:migrate RAILS_ENV=production


    -- Erlend
    • CommentAuthorari
    • CommentTimeJul 27th 2008
     permalink
    That worked, thanks. I updated http://wiki.clockingit.com//wiki:source
    • CommentAuthorraz
    • CommentTimeJul 28th 2008
     permalink
    Updated /Upgraded...

    Still have problems connecting to the push sever.

    <script type="text/javascript">
    new Juggernaut({ host:'projects.egefcu.org', port: 3001, channels:["info_1","user_1","channel_passive_2","activity_1","tasks_1"], sounds: true });
    </script>

    I don't see anything missing.
    • CommentAuthoradmin
    • CommentTimeJul 28th 2008
     permalink
    What happens if you try telnet projects.egefcu.org 3001 from the machine you're trying to browse with?

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 28th 2008 edited
     permalink
    connecting to projects.egefcu.org 3001.... could not open connection to the host, on port 3001: connect failed
    • CommentAuthoradmin
    • CommentTimeJul 28th 2008
     permalink
    Well, that's your problem then. Either the push server isn't running on that host on that port, or something is blocking the port from access.

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 29th 2008 edited
     permalink
    The command to start the push_server is below, right?

    nohup ruby ./script/push_server

    The command I'm running is: nohup ruby script/push_server & ruby script/server -e production
    • CommentAuthoradmin
    • CommentTimeJul 29th 2008
     permalink
    Could you first try and stop all running push_servers?
    ps aux | grep push_server
    kill -9 <process number from previous command>

    and then try and run it in the foreground so you see any errors that might be popping up?
    ruby ./script/push_server

    -- Erlend
    • CommentAuthorraz
    • CommentTimeJul 29th 2008
     permalink
    Killing the process and runner the ruby ./script/push_server command as SUDO, worked. Thank you
    • CommentAuthorraz
    • CommentTimeJul 29th 2008
     permalink
    I have a user that is using IE 6. When they login and go to a chat room. The page just scolls and scolls no text area or send message button. Any thoughts?
    • CommentAuthoradmin
    • CommentTimeJul 29th 2008
     permalink
    Upgrade to IE7, FireFox, Safari or Opera. :-) Actually, it's a bug in the IE7.js I'm using to try and make IE6 somewhat usable, and it appears when reloading the page while not being scrolled all the way to the top, or initiating scrolling of the page while it's not completely rendered.

    -- Erlend