issue in deployment of ovdlt
Hi ,
First of all i would like to thank you all(whole team) for making
such an amazing application.
i am a student trying to deploy ovdlt on my application for my
college.
I am at very basic level in ruby on rails.
I have installed : ruby 1.8.7 (2011-06-30 patchlevel 352)
[i686-linux]
Rails 2.3.5.
tomcat : Server version: Apache/2.2.16 (Ubuntu) with phusion passenger.
mysql : Server version: 5.1.49-1ubuntu8.1 (Ubuntu)
After installing ror on my sys i have executed the following
command :
username@username-desktop:/var/www$ sudo ruby init.rb
ovdlt-2010-06-21.tgz videosite root password
== AddPasswordResetCode: migrated (0.0269s) ==================================
== AddDownlodsToVideo: migrating ============================================= -- add_column(:videos, :last_viewed, :datetime, {:null=>true}) -> 0.0169s -- add_column(:videos, :last_downloaded, :datetime, {:null=>true}) -> 0.0179s -- add_column(:videos, :downloads, :int, {:default=>0, :null=>false}) -> 0.0344s == AddDownlodsToVideo: migrated (0.0703s) ====================================
== ChangeTitleType: migrating ================================================ -- change_column(:videos, :title, :text, {:limit=>100, :null=>false}) -> 0.0664s == ChangeTitleType: migrated (0.0669s) =======================================
== ChangeAnnotationType: migrating =========================================== -- change_column(:bookmarks, :annotation, :text, {:limit=>800}) -> 0.0189s == ChangeAnnotationType: migrated (0.0192s) ==================================
(in /var/www/videosite).
Then in apache2.conf file i have added the following code
:
ServerName www.myvideosite.com
DocumentRoot /var/www/videosite/public
<Directory /videosite/public>
AllowOverride all
Options -MultiViews
</Directory>
When i run The requested URL http://localhost/myvideosite/public/
Not Found
The requested URL /myvideosite/public/ was not found on this
server.
when i run The requested URL http://localhost/videosite/public/
output : i have attached image of it :)
would be great help :)
-
Screenshot-3.png
122.4 KB
Support Staff 2 Posted by ggeisler on 07 Dec, 2011 10:40 PM
Hi,
Thanks for providing the detailed information about your issue. Have you tried going to http://localhost/myvideosite , rather than http://localhost/myvideosite/public/ (i.e., do not include "public" in the url)?
In your apache2.conf file you should include "public" in your DocumentRoot specification (as you did), but that typically corresponds to either the root directory of the server (http://localhost/myvideosite) or a subdomain (http://localhost/myvideosite/videocollection/) if you configured a subdomain using the RailsBaseURI option in your conf file. So you should not include the public part when entering the url of the site.
See the page at https://ovdlt.tenderapp.com/kb/installation/configure-your-web-server for details.
Gary
3 Posted by akki on 08 Dec, 2011 04:15 PM
Hi,
Thanks for your reply,but still i am not able to get the home page of ovdlt application
I have installed ovdlt application using command :
sudo ruby init.rb ovdlt-2010-06-21.tgz videosite root password.(Deploying To a Root URL)
in my apache2.conf file i have added :
When i run the requested URL
http://localhost/myvideosite/ or http://localhost/myvideosite/public still NOT found.
After referring to the document again the only step i am unable to perform is
Change ownership of all installed OVDLT application files and directories to the web server:
sudo chown -R apache sitename
(Note : i have tried : sudo chown -R username videosite) and try to run the above mention url : http://localhost/myvideosite/ (https://ovdlt.tenderapp.com/kb/installation/installing-the-base-ovd...) from this page.
Support Staff 4 Posted by ggeisler on 08 Dec, 2011 09:57 PM
I think the problem might be more with getting your general environment set up correctly than with OVDLT specifically. Have you successfully installed and run another Rails app with MySQL on this server?
If not, I suggest you try to create a separate, very simple Rails project on your server (since you said you were at a basic level with Rails, I'd suggest following the instructions in the Rails Guides here: http://guides.rubyonrails.org/v2.3.11/getting_started.html ). Basically, I'm suggesting we make sure the issue is not with something other than OVDLT, because I really can't help you troubleshoot your local server configuration.
Gary
5 Posted by akki on 10 Dec, 2011 07:32 PM
I have created and deployed basic rails application on my server,
I was successful in deploying and getting the home page.
But while deploying ovldt application i am getting error messages :
Error message:
Exception class:
Application root:
Backtrace:
and so on please help.
Support Staff 6 Posted by ggeisler on 10 Dec, 2011 07:52 PM
My guess is this is a gem version issue. Sometimes there are gem dependencies that have conflicts unless you have specific versions, which in some cases cannot be the most recent.
Which version of rubygems are you running?
Post the results of the two commands below:
$ gem -v
$ gem list
7 Posted by aqueel liveheart on 11 Dec, 2011 05:08 PM
Hi,
Please found the details of gem -v and gem list command.
akki@akki-desktop:~$ gem -v
1.8.10
akki@akki-desktop:~$ gem list
*** LOCAL GEMS ***
actionmailer (3.1.3, 2.3.5)
actionpack (3.1.3, 2.3.5)
activemodel (3.1.3)
activerecord (3.1.3, 2.3.9, 2.3.5)
activeresource (3.1.3, 2.3.5)
activesupport (3.1.3, 2.3.9, 2.3.5)
arel (2.2.1)
builder (3.0.0)
bundler (1.0.21 ruby)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.1.3)
daemon_controller (0.2.6)
erubis (2.7.0)
execjs (1.2.12)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
json (1.6.3)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.4)
mysql (2.8.1)
mysql2 (0.3.11)
passenger (3.0.11)
polyglot (0.3.3)
rack (1.3.5, 1.1.2, 1.0.1)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.3, 2.3.5)
railties (3.1.3)
rake (0.9.2.2, 0.9.2)
rdoc (3.11)
sass (3.1.11)
sass-rails (3.1.5)
sprockets (2.0.3)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.1.0)
Support Staff 8 Posted by ggeisler on 12 Dec, 2011 05:39 PM
Okay, it looks like you're working in a Rails 3 environment. OVDLT is still only a Rails 2 application and won't work if you try to use version 3 of the Rails components (actionmailer, activesupport, etc.).
If you don't have experience with setting up multiple environments on your machine, you can take a look at RVM:
http://beginrescueend.com/rvm/basics/
After you set up RVM, it will give you the capability of switching between a Rails 3 and a Rails 2 environment on the same machine.
As an example, my Rails 2 environment, in which I can run OVDLT successfully from the same download package you are using, looks like this:
$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
columnize (0.3.4)
daemon_controller (0.2.6)
fastthread (1.0.7)
linecache (0.46)
mysql (2.8.1)
passenger (3.0.8)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2)
rbx-require-relative (0.0.5)
ruby-debug (0.10.4)
ruby-debug-base (0.10.4)
rubygems-update (1.4.2)
$ gem -v
1.4.2
You can use a newer version of rubygems-update, but I would stick to 1.6.0 or below to be sure it'll work, since I recall having some gem compatibility issues with Rails 2 and newer versions of rubygems-update.
9 Posted by akki on 13 Dec, 2011 06:44 PM
Hi ggeisler,
i have downgraded rails to 2.3.5,
akki@akki-desktop:/etc/apache2$ rails -v
Rails 2.3.5
akki@akki-desktop:/etc/apache2$ gem -v
1.8.10
akki-desktop:~$ gem list
LOCAL GEMS actionmailer (2.3.5)
actionpack (2.3.5)
activemodel (3.1.3)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
arel (2.2.1)
builder (3.0.0)
bundler (1.0.21 ruby)
daemon_controller (0.2.6)
erubis (2.7.0)
execjs (1.2.12)
fastthread (1.0.7)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
json (1.6.3)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.4)
mysql (2.8.1)
mysql2 (0.3.11)
passenger (3.0.11)
polyglot (0.3.3)
rack (1.0.1)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.5)
rake (0.9.2.2, 0.9.2)
rdoc (3.11)
rubygems-update (1.8.12, 1.6.0, 1.4.2)
sass (3.1.11)
sass-rails (3.1.5)
sprockets (2.0.3)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.1.0)
Still i am getting error .pfa the document
Support Staff 10 Posted by ggeisler on 14 Dec, 2011 04:23 PM
Hi,
I see two potential problems. One is that activemodel is showing a version 3; I'm not sure this is a problem, but the other Rails components are at 2.3.5 and I'd expect activemodel to also be at 2.3.5.
The other is the version of rubygems. This is the one I've had the most problem with in the past, in terms of version compatibility. I'd really recommend uninstalling the 1.8 version and going with 1.6.0. (See my previous reply with my gem list.) I'm not positive about all of the details, but I believe there are issues with versions newer than 1.6.0 and Rails 2.
Also, your gem list includes a lot of other Rails 3-related gems. They probably aren't an issue, but to me the safest thing to do is use RVM (mentioned in previous reply) to create a new gemset, and only include in that gemset the gems required by Rails 2 and OVDLT. That makes it easier to eliminate potential problems that are keeping you from getting OVDLT started in your environment.
Gary
11 Posted by aqueel liveheart on 16 Dec, 2011 04:29 PM
On Wed, Dec 14, 2011 at 9:53 PM, ggeisler <
[email blocked]> wrote:
Hi,
Thanks a lot for your valuable help,I had successfully deployed ovldt
application on my maching,issue was with version of rubygems.Now i have
1.4.2 on my system.
I have some question's regarding the application.
Question 1)Ovldt will be used in our college,so we have to stop user to
download video.
User can only view it online on the website.
Question 2)After deploying the application in the right corner there are 4
tabs under browse
1. Genre 2.Language 3.Geographic region 4.Color
Consider that there are 4 users (A,B,C,D) if we want that user A should
only be able to access (view) 1.Genre other's should be hidden, user B can
acces(view) 2.Language and other's hidden, user C can access (view)1.Genre
and 3.Geographic region other's hidden.
Question 3) How to disable register functionality.We had thought that we
will register and then provide username and password to the user on their
mail,No one apart from administrator should be able to create users.
Support Staff 12 Posted by ggeisler on 22 Dec, 2011 12:04 AM
Hi,
Glad to hear that you have successfully deployed the application. Below I try to address your questions, but please understand that OVDLT has not been developed to provide a lot of ways to customize the sort of things you are interested in doing. I also don't have a lot of time to help with customization issues like yours, unfortunately. It is assumed that someone wanting to do significant customization would have Ruby on Rails experience and could experiment with the code themselves to achieve whatever customization they want to do.
Question 1: I don't know that there is a way to truly prevent a user from downloading video on the web without using a streaming server (which OVDLT is not set up to do). This is not an OVDLT specific issue; you could do some web searching and see what strategies there are for protecting video from being downloaded, and then update the OVDLT code to implement whichever strategy you think will work for your situation. The relevant OVDLT files are probably
app/views/videos/show.html.haml,app/controllers/videos_controller.rb, andapp/models/video.rb. Setting up a streaming server and updating those files to support it is probably the most secure way to prevent downloads; I can't really help with actually doing that, though.Question 2: This is a rather complex scenario and support for it is not something built into OVDLT. Customizing OVDLT to do this would require some significant effort by someone with Rails experience who took some time to get familiar with the OVDLT code, most likely.
Question 3: One way to disable registration would be to 1) remove or comment out the view code that shows the registration fields, which is at the bottom of
app/views/layouts/application.html.hamlstarting with the line ".popup-reg" and the entire page atapp/views/users/new.html.haml, and 2) remove or comment out the "map.register" and "map.signup" lines in theconfig/routes.rbfile.But you will still need to register your users yourself. To do this, you can create new users from the Rails console. See below for an example of creating a new user manually:
To change an existing user password, do this:
You might also want to comment out the
UserMailer.deliver...lines inapp/models/user_observer.rbso no emails are sent when you do your user registrations manually. You could just send emails to the new users yourself and not have to worry about getting the mailer working with your manual registration setup.Sorry I can't provide exact solutions to your questions, but hope these answers help a bit.
Gary