"rails generate" does not seem to work - ruby-on-rails

I got rails installed on my system. I have been trying to create a model for my application, but it doesn't seem to work. I found a question which was of the same nature and i even tried to change the rails file in app/bin/rails: but to no avail.

Related

undefined method `stylesheet_pack_tag'

I'm relatively new to using Ruby on Rails and I've been trying to use ActiveAdmin for my project. However, despite even starting my Rails project from scratch again and trying to update anything related to the problem nothing I've been doing seems to work.
I don't know why, but my project simply refuses to accept stylesheet_pack_tag as a method.

ruby on rails unable to find interface that appears to be proplery defined

I'm brand new to ruby on rails and trying to run an application developed by others. I downloaded it from SVN it running yesterday, but today when I try to run it the first attempt to access the site's home page I get the message:
expected .../app/helpers/interface/table_helper.rb to define Interface::tableHelper.
.../lib/active_support/dependencies.rb:452:in 'load_missing_constant'
This file exists, and properly defines the tableHelper interface. Since I was able to run the program when I was setting it up yesterday, and others can run it without issue, I assume the problem I'm seeing is caused by an incorrectly set up environment rather then bad code somehow.
Can anyone suggest what I might try to figure out why rails can't seem to detect a properly defined interface?
If you were able to run the program once, perhaps something got screwed up? Have you made any changes to the code?
Alternatively, try stopping and restarting the server.
Also: what's the application? Maybe we can look at the codebase...

Just started a new spree app, but can't find a way to generate theme_default

Anyone know how to generate a default_theme so that it can be edited? It seems that all the core files are hidden and uneditable.
The last working spree app I made started with theme_default exposed under vendor/plugins.
Because this one is in Rails3, I pulled it right from the official railsdog git, thus no theme_default, and no haml.
I'm probably missing something obvious. Any ideas?
Basically, to create your own views, the starting point is to create our own extension. You can achieve this with the command you'll find here:
http://spreecommerce.com/documentation/extensions.html#creatingan-extension
Then it's like any raRails Engine, you can create the views you want, they'll override spree's.
Is rake sandbox what you are looking for? See Building a Sandbox Application
You only do rake sandbox just for test purpose, I have found this link
Change the command for rails g spree:extension [ext_name].

Getting tables to work is RadRails?

When I manually enter tables into the .rb file in the migrate folder nothing shows up. I have followed a few different "how to's" but I can't get the tables to show up when I preview my work. I can however get one table to show up if I create it in the parameters when generating a scaffold, but that's one table. I have Rails version 2.3.4 and version 1.2.3 installed on my lame Windows Vista. I have tried using both versions multiple times. I am also trying to follow the Ruby on Rails for Dummies book, but it seems a little outdated. Any tips on getting tables to work? Its supposed to be really simple and take "just minutes" to complete this simple app. Maybe something didn't install right? Maybe a better book?
Just want to make sure you're using all the tools available to you:
To generate a migration file:
./script/generate MigrationFileName
Take a look at the Database Migrations Guide from the official Rails Guides for the correct syntax and options for creating a migration file.
Once you've created your migration, you need to run the following:
rake db:migrate
This will populate the database with the information specified in the migration file.

acts_as_ferret multi model search not working in rails app

I am trying to solve a strange issue with ferret/acts_as_ferret
Of course I have googled and posted the question:
http://www.ruby-forum.com/topic/188570
Basically aaf works on single models with no issue. It also works on single models using the config/aaf.rb file I have setup. It even works when I do a multi-model search in the console, but within the rails app itself I get:
undefined method `ferret_rank=' for <object that has a match>
If anyone has had the same experience/problem and can shed any light I would appreciate it.
PS: I followed the following tutorial to get where I am now.
http://opensoul.org/2008/4/29/using-shared-indexes-with-acts_as_ferret
Do you have the plugin installed or just the gem? You might want to install the plugin.
I would also try rebuilding the index.
For my purposes, I switched to Solr and life is a lot easier. Sphinx is missing a lot of stuff that I need.

Resources