Hey everyone,
Due to an issue with a few migrations in a dev environment I needed to recreate the database. A quick Google search revealed that it is possible to do this in a single line:
#Execute via console rake db:drop db:create
Hey everyone,
Due to an issue with a few migrations in a dev environment I needed to recreate the database. A quick Google search revealed that it is possible to do this in a single line:
#Execute via console rake db:drop db:create
Hey everyone,
I’ve just done a fresh install of RVM using the guide below. There were a few dependencies missing, but other than that it all went pretty smoothly.
Link: http://stjhimy.com/posts/10-five-quick-steps-to-set-up-rvm-with-rails-2-and-rails3
Next time I do an install I’ll try to document the whole thing, but for now that link is probably one of the better/simpler guides I’ve come across. If you have any problems please leave a comment below and I’ll try to get back to you.
UPDATE:
Just another guide I’ve come across that seems to work well, this one is a complete “start to finish” one:
http://rails.vandenabeele.com/blog/2011/11/26/installing-ruby-and-rails-with-rvm-on-ubuntu-11-dot-10/
Just a quick post on the command to start the rails console:
chris@chris-VirtualBox:~/site$ rails console Loading development environment (Rails 3.1.1) irb(main):001:0>
Here’s the documentation, it provides a pretty good summary of all the commands you’re likely to need.
Due to a few recent issues with SunSpot (see my previous posts), I’ve decided to uninstall it until I have enough time to work on it properly. Once again, Ruby makes this pretty simple:
chris@chris-VirtualBox:~/site$ sudo gem uninstall sunspot [sudo] password for chris: You have requested to uninstall the gem: sunspot-1.2.1 sunspot_rails-1.2.1 depends on [sunspot (= 1.2.1)] If you remove this gems, one or more dependencies will not be met. Continue with Uninstall? [Yn] y Remove executables: sunspot-solr, sunspot-installer in addition to the gem? [Yn] y Removing sunspot-solr Removing sunspot-installer Successfully uninstalled sunspot-1.2.1
After a bit of a Google I came across a post mentioning that a few people had encountered this after installing Solr. I had previously setup Sunspot, which just so happens to sit on top of Solr.
Manually starting solr fixed the problem – just using the code below:
chris@chris-VirtualBox:~/site$ rake sunspot:solr:start
Anyway, that’s all I’ve got for you for now, Good Luck!
UPDATE: I had this problem again this morning and realised that it was the models with search fields still defined that were triggering the error. Removing this code seems to have completely resolved the issue.
Well, looks like the first thing I’ve managed to break today is WEBrick – a web server for ruby on rails. The general idea behind the error message appears to be that the address it’s trying to start is already in use: