I am meeting a rails problem.
I created a rails folder by this command
rails new airbnb-clone -T -d postgresql --css tailwindcss
And it gave me these problems
1st
rails turbo:install stimulus:install
rails aborted!
Second
rails css:install:tailwindcss
rails aborted!
I thought that when I used the code tailwindcss, it must automatically create the tailwindcss by rails ? So why it had these error ? Should I must install tailwindcss by hand ? Could you please give me some advices?
By the way, here is my rails and ruby v
rails -v 7.0.4
ruby -v 3.1.2
Just change the argument to tailwind instead of tailwindcss:
rails new airbnb-clone -T -d postgresql --css tailwind
I use this command, you can try. I think that's oki.
rails new airbnb-clone -T -d postgresql -c=tailwind
Related
I'm not to ruby on rails, and I'm setting up my first application, according to a textbook (Ruby 4 in Rails). No action is triggered, When typing the command:
$ rails generate scaffold purchase name:string cost:decimal
Can anyone help me resolved this?
I installed Ruby and Rails, newest versions and then did the following steps before typing the mentioned command.
$ rails new things_i_bought
$ cd things_i_bought
$ rails server
When you do
$ rails server
You're starting the server. You don't to want do that when working from the command line.
Hit Ctrl-C to stop the server, then run your scaffold command.
I would like to create a new model for a Ruby on Rails application. I know that this should do:
$ ruby script/generate model Book
But it gives me:
ruby: No such file or directory -- script/generate (LoadError)
Why is that? How can I fix that? I am in my application folder.
What version of rails are you running? As far as I know it should be script/rails - but I am running rails 3.1.3
Edit: as #Jeremy bellow stated, in rails 3 and up it is script/rails - or of course, more generally, just rails
Run
ruby script/rails -h
and you should see the available commands
Run
ruby script/rails generate -h
to see what is available to generate
Alternatively, you should also just be able to run:
rails generate -h
I have never found the ruby script/rails portion to be necessary, it defaults to that automatically
If you're using Rails 3, you do it like this:
$ rails generate model Book
The way you tried is the old way. Maybe you're following an old tutorial or something.
My terminal is showing this at the start of the command line:
subalcharla#subal-charlas-macbook ~ $
And as a consequence when try to create a new app using rails with the command:
subalcharla#subal-charlas-macbook ~ $ rails new sample_app --skip-test-unit
The app that appears in Finder in my Mac 10.5.8 is named new instead of sample_app. Also, --skip-test-unit does not seem to be working.
Please help.
Looks like you have an older version of rails installed to check the version in you terminal type
rails -v
if the version is < 3.0, update rails to 3.2
gem install rails -v 3.2
I'm trying to get RoR installed on my Ubuntu install and have it running with MySql. RoR and MySql have both installed fine and working but I'm having problems getting rails to work with MySql following this tutorial: http://wiki.rubyonrails.org/getting-started/installation/linux
To test your Rails installation, generate a new Rails project:
$ rails myrailsapp
If you are using MySQL, use the following command:
$ rails myrailsapp -d mysql
Now I know that you now have to type rails new [appname] not just rails [appname] to get this working once this is done and project is created its still using the sqlite3 databse so I run the next line $ rails myrailsapp -d mysql when I do this I just get a large list of text giving me various options with out changing anything.
What have I done wrong?
You actually want to generate the project with the -d specifier, not apply it to your project after generation. Start a new project like this:
rails new myrailsapp -d mysql
You need to enter just one command:
rails new railsappname -d mysql
It will create a rails app with mysql configuration.
Welcome aboard #twigg to the Rails world =).
First of all, you have to specify your Rails version you installed. If your Rails version < 3 then you can create a new project by simply running the command rails my_app_name. If you are using Rails > 3 then to create a new project just run the following command rails new my_app_name. This command will create a bunch of files one of them is the database.yml where you can configure you database parameters (adapter, username, password and database name).
If you are using Rails with MySQL, then to create a project configured with MySQL, just run the command rails my_app_name -d mysql in Rails < 3 or rails new my_app_name -d mysql
Don't forget to install the adapter of the database which is in your case (MySQL) ruby-mysql by running the command gem install ruby-mysql
I was following an online tutorial to create an Ruby on Rails application on App Engine.
There is one command which other people can run, but it didn't run on my Ubuntu 10.10:
ruby script/plugin install http://svn.avdi.org/nulldb/trunk/
When I try to run it, it complains: ruby1.8: No such file or directory script/plugin (LoadError)
What is wrong with my computer?
ruby -v ==> 1.8.7
rails -v ==> 2.3.10
gem -v ==> 1.3.7
if using rails3, cd into your rails app root dir then use
rails plugin install http://url/of/your/package
If you are using Rails 3, you no longer have a script/plugin directory.
Rails 3 now runs commands through the "rails" script.
You can find your version of rails with rails -v
I had similar problem with rfacebook on rails 3
solution that worked for me:
cd \MyAppName\app
rails plugin install svn://rubyforge.org/var/svn/rfacebook/trunk/rfacebook/plugins/rfacebook
Have you tried just plain old script/plugin install http://svn.avdi.org/nulldb/trunk/ ? Also are you sure that you're in the correct directory?(the rails project main directory) And are you sure that you have the file script/plugin?
First of all make sure that you are running that command from the root of your rails app.