Running rails server within file does not show changes. Perhaps git related - ruby-on-rails-4

I'm having a hard time articulating my problem: when running the rails server within a file, the changes I made earlier today are not appearing on my local host. Yet, when I open the file in Sublime it shows that all of my code is there. It was working earlier today. I know it is not a rake database issue as the most recent changes I made to the model are showing up on the local host.
Link to github: https://github.com/BrianLobdell/depot
Please help!
-Brian

All I needed to do was run $ rake db:seed. still have no idea why I needed to run it again.

Related

How to make update in Django webservice made in python on windows

I have installed Python 27 successfully.
And with respect to project requirement i have also installed following packages.
Django==1.4.3
MySQL-python==1.2.4
PIL==1.1.7
South==0.7.6
argparse==1.2.1
distribute==0.6.28
django-appconf==0.6
django-imagekit==2.0.2
pytz==2012j
six==1.2.0
wsgiref==0.1.2
Now the problem is, i dont know how to make this run, or visible in python.
Can anybody please help me, to get out from this.
I have to change few webservices and also want to add some functionality.
This webservices are attached with wordpress website.
So, please help me to configure whole this project on local (Windows PC).
Thanks in advance
Go for the Touch Command of Django for this issue,
I think it will make helpful to you.
Thanks!
i have solve this, find below instruction for users who have same queries:
Restarting the Spawned Server
If you change any Python code on your site, you’ll need to tell FastCGI the code has changed. But there’s no need to restart Apache in this case. Rather, just reupload mysite.fcgi – or edit the file – so that the timestamp on the file changes. When Apache sees the file has been updated, it will restart your Django application for you.
If you have access to a command shell on a Unix system, you can accomplish this easily by using the touch command:
touch mysite.fcgi
For more information:
http://www.djangobook.com/en/2.0/chapter12.html
Thanks

copy heroku app local

A customer of mine has a Heroku Python/Django application that they have asked me to take a look at and I am trying to understand the process of getting it running on my local Windows 7 laptop. I have been searching the net without any success. Does anyone have a suggestions or guides on how to do this.
Please have a look here : Collaborating with Others
They should add you as a collaborator so you can git clone the project files. They can do it via the heroku toolbelt installed on their computer (in command line) or via the Dashboard heroku

Trouble with Django-Kronos

I have a weird problem with Django-Kronos.
I've got it running successfully on my local machine and on our development server. However, on the production server, I can't get kronos to acknowledge my cron.py file. When I run installtasks, it runs but says "0 tasks installed". I've also tried running the tasks manually and kronos tells me the task doesn't exist.
We use git to push everything through to the server, so all the files and the structures are identical between the three locations. I've also checked and the cron.py file exists and has exactly the same content as the working servers.
The only differences between the servers is that the production server is running Postgres (SQlite on the dev server) and it's Ubuntu 12.10, whereas the dev server is 12.01.
Kronos is functioning properly, but it's not picking up our cron.py file for some reason....
Any got any ideas?!
Well, unfortunately, our solution was to scrap Django-Kronos altogether and create a custom management command which we're running from the crontab.
This happens when one of import you are trying to make is not there, your production system might be missing some Python package which is included in your cron.py.

django-rosetta not saving translations on hitting "Save and Translate next block" in Chrome

django-rosetta is not saving the translations on hitting "Save and Translate next block" in Chrome.
It seems to be working fine in Firefox though. I tried clearing cache so that does not seem to be an issue.
On Chrome, after entering translated text and hitting the "Save.." button, I'm redirected to the main screen without my changes being saved.
I updated to the most recent version of rosetta thinking that the Issue13 fix would solve my problem but it does not.
I've also made sure that my .po and .mo files have 777 permissions.
Been a long time, not sure if you were able to sort it out?
I have a dev environment running Django 1.4.2 and Rosetta 0.6.8 on Lion and it works flawlessly. Im setting it up with the python manage.py runserver command.
Then when I wanted to deploy it to my Ubuntu 12 server Rosetta started to behave quite weird. I installed Nginx as a proxy and was running apache with wsgi. Same versions besides that. It was not just the translated strings that were not being saved but the navigation became absolute random. Did not matter what button I pressed, I suspected the proxy configuration wasn´t setup properly since I could run it locally in my dev.
To make a long story short, I finally shutdown nginx and apache and just ran django with the builtin and hence got the django logs in my terminal. It got a lot of errors that made the server restart itself every few seconds. This obviously explained the somewhat non-reliable behavior of the app. I dumped the database in production and resynced it. Now when I runserver in production it works just as good as in my dev. When I plug in apache to do the job (going around nginx for the moment) the problem still persist, not as bad as before though. Browser does not make any difference.
One of the errors that did pop up was this
Unhandled exception in thread started by <bound method Command.inner_run of <django.contrib.staticfiles.management.commands.runserver.Command object at 0x1781710>>
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 50, inapport_excepthook
if not enabled():
TypeError: 'NoneType' object is not callable
Still havent solved this but will be posting the solution when I do.
EDIT:
Scratched the good ol´ apache wsgi setup and went for Gunicorn instead. Works really well now, not sure what that was all about but I´m quite happy with the new setup anyways.
Here´s a good setup guide
http://ijcdigital.com/blog/django-gunicorn-and-nginx-setup/
hopefully this helps someone in the future!

plone change in code not visible in development site

I am very new to plone. I have a project folder in eclipse. I have imported it from the cvs project. I have zope as server and I start zope with ./bin/instance restart. When I make changes in my folder, I cannot see the changes in the development website. I can't seem to find what is happening. I even restarted zope after making changes in python. Can anyone help me with this?
Make sure you start your Zope server with bin/instance fg, most likely the name of the script if you used the Plone universal installer buildout.
To see changes in python code you'll either need to restart the server (CTRL-C then start again) or use something like plone.reload to request a reload of changed code.
When starting your server with the fg command, it is automatically running in debug mode and any templates, resources and skin items are reloaded automatically. Start the server with console or start and it'll run in production mode and templates and such are loaded from disk only once.
See the Plone.org documentation on buildout for more information.
The bin/instance command has a built-in help command, try:
bin/instance help
for a list of supported commands or run:
bin/instance help console
to get help on a specific command; the above example will print the help on the console command.