I'm trying to setup django-mediagenerator with Sass, but whenever it tries to compile the .scss files, I get the following error:
ValueError: Failed to execute Sass. Please make sure that you have
installed Sass (http://sass-lang.com) and Compass
(http://compass-style.org). Error was: [Errno 2] No such file or
directory
I've installed both the sass and compass gems...
gem install sass
gem install compass
...And I can verify that they are both installed...
sass --version
compass --version
What exactly have I missed? Does sass need to be installed in a specific location? Do I need to set up some sort of virtual environment like I have with python?
Edit:
If I run which sass I get the following:
/Users/USER_NAME/.rvm/gems/ruby-1.9.3-p194/bin/sass
django-mediagenerator assumes that the sass executable is in the PATH environment variable. In this case, your web server is not running with the same PATH as your normal user environment. You should either add /Users/USER_NAME/.rvm/gems/ruby-1.9.3-p194/bin/ to the PATH where the web server is launched, or install sass and compass in a location which is already included.
Related
I have tried to create envelope on my linux pop os system using miniconda. When I activate it, I can install packages using pip, but when I run my django instance it doesn't find the modules.
If I type which python is shows the miniconda path correctly. I can look in the site-packages folder and see the packages installed.
I've tried installing django-anymail and corsheaders and they are both not being found. It does find my locally installed apps.
If I use the command line and open python and then import, it does not recognize my modules installed in the virtual envelope either. I thought it was a problem with conda, so I also created an envelope using python's native method: python3 -m venv
I have the same problem with it finding pip install site-packages.
Is there a command I can run to show all available packages?
I hadn't realized I had aliased my python. Now it is working.
I downloaded the necessary files from the link https://github.com/django/django.git and pasted them in to my virtual env directory
After setting up and activating the virtualenv, when I run the following command:
$ pip install -e django/
It produces this error:
(ENV) C:\WINDOWS\system32>pip install -e django/ django/ should either
be a path to a local project or a VCS url beginning with svn+, git+,
hg+, or bzr+
I am a Windows user. I think the command is for bash not for cmd.
Is it necessary to use this git tool to finally work with django ?
As instructed on the Django website :
If you're just starting out with Django development I'd recommend looking at some YouTube videos before jumping into the Django docs. Personally when I was starting out I found that the docs were quite hard to understand in the beginning, but as you get better you can refer back to them more and more.
Here's a good beginner video series to get you started.
In any case, I would recommend using virtualenvwrapper-win so that you can work on multiple Django projects without any conflicts.
First, ensure that you have added Python to the Windows environment. Open CMD and run pip install virtualenvwrapper-win.
Then cd to whichever directory your project files will be in and run mkvirtualenv projectname.
Finally run setprojectdir path/to/folder
Now whenever you want to enter that virtual environment and work on your project all you have to do is run the command workon projectname and it'll do the rest for you. You'll know it worked if on each new line in the command prompt it gives you (projectname) in brackets.
To actually install Django all you need to run is pip install django while in the virtual environment.
From your question, I suppose that you are trying to install django inside your virtual directory. If that is correct you dont need to get it from git.
Alternate way is to create a directory "main" and then project directory "mydjangoproject" inside it and a virtual environment "env".
C:\>mkdir main
C:\>cd main
C:\main>mkdir mydjangoproject
C:\main>virtualenv env
Now activate the virtual environment.
C:\main>env\Scripts\activate
Then install all the package in it. e.g
(env) C:\main>pip install django
I'd like to use zurb foundation (SCSS) in conjunction with codekit on my laptop, currently running mavericks but I'm unable to do so once I try to use the compass
I've installed the required gems:
sudo gem install sass
sudo gem install compass
gem install zurb-foundation
sudo gem environment .
I open codekit, open preferences, click sass/scss and select the 'use the sass executable at this path' then proceed to choose 'sass' from the bin folder.
When I try to do the same process for compass, the compass file isn't present in the bin folder.
I've attempted to locate it elsewhere but I've been unable to do so.
Has anyone else encountered this problem/anyone have any idea how to fix it?
Any help would be greatly appreciated.
Thanks.
Try install foundation using Bower and then just include foundation classes into your main styles file. For me it works great with a codekit.
I'm following the guide over here to install Foundation with Sass. I've got Git, Ruby and Node.js installed. I also believe Bower is installed correctly because when I type bower help into the command line I get information on its command.
When I try to install Foundation with gem install foundation I get this error:
Fetching: foundation-1.0.4.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/gems/foundation-1.0.4/.gitignore
If I then try adding sudo to the beginning of that command it seems to install just fine. Is this the correct way to do this?
Then when I enter foundation new test-project it creates that directory and seems to create those files, but when I go into the "test-project" folder it's empty.
Does anyone have an idea of what I'm doing wrong? Any help would be appreciated.
Thanks in advance!
Ok, so it seems like it with a problem with my git install. I uninstalled git and installed the latest version, and that seemed to do the trick. That folder is now populated with the Foundation files and I can get to work!
So I downloaded the app with easy_install and it worked. I can import registration.
BUT the code installed doesn't match the source code for the project, as seen in github. For example, I'm missing the modules backends.urls and tests. I'm also missing key files like auth_urls. Without these modules, the registration app is failing on me.
Could this be related to my directory structure?
My Ubuntu distribution has placed all my python files in /usr/local/lib/python2.6/dist-packages/
as opposed to /usr/local/lib/python2.6/site-packages/
Otherwise, I'm stumped here.
The easy_install version was really out of date last time I tried.
You'll need to either download the source and run python setup.py install from the extracted directory or checkout from the Git repo and run the same command.
I guess that easy_install installing 0.7 version. But in a github you can see 0.8 alpha