I am new to Ruby on Rails and am simply trying to setup a sample application by following a getting started guide. I am installing Rails on a Mac OS X Mountain Lion. I get rails working where I can run the default getting started application. When I try to run the rake db:create command, however, I am getting the following message:
rake aborted!
cannot load such file -- sqlite3/sqlite3_native
I know there are a bunch of questions asked and answered regarding this but none of the suggestions already identified have been able to help.
Please let me know what I can do to get this working.
Thanks
Cameron
Related
Project:
https://github.com/jmopr/job-hunter
Background:
Took only 2 intro course on Java 7 years ago.
So I was browsing GitHub and ran across this nifty project that deals with scraping & applying for jobs on indeed.com.
The question is, how do you run it? Here is what I tried to do:
Tried to execute applier.ru I figured I was doing something wrong after getting:
/home/shap/Desktop/job-hunter-master/applier.rb:19:in initialize': uninitialized constant JobApplier::Job (NameError)
from /home/shap/Desktop/job-hunter-master/applier.rb:169:innew'
from /home/shap/Desktop/job-hunter-master/applier.rb:169:in `'
Something was missing, so looking around I found the bin folder and tried executing /bin/setup.ru but i ran into this error:
== Preparing database ==
/var/lib/gems/2.3.0/gems/railties-4.2.5.1/lib/rails/application/configuration.rb:110:in database_configuration': Cannot loadRails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"] (RuntimeError)
Are we supposed to generate our own database file? how would we do that?
Any help or even a push in the right path is deeply appreciated.
You are supposed to generate your own database configuration. It should be stored at config/database.yml. It's a file that specify where's your db server, what's the name of the database and what should be the credentials to access it. Google "rails database.yml example".
Once you have that, creating your actual database is as easy as running these commands
rake db:create
rake db:migrate
There may be many-many other different obstacles on your journey of making this application run. Things that are obvious to rails devs, but arcane to total strangers. I suggest finding and completing a ruby on rails tutorial.
This is ruby on rails project,
after checkout you need install all required dependencies, with command
bundle exec install
Run project you can with command
./bin/rails server
If project is started successful, you can access it with browser using address http://localhost:3000
more about rails you can find there http://guides.rubyonrails.org/getting_started.html
http://guides.rubyonrails.org/getting_started.html
I'm trying to run the command rake db:migrate but I keep getting this error:
/Users/[name]/.rvm/gems/ruby-2.2.1/bin/rake:23:in `load': cannot load such file -- /Users/[name]/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/specifications/default/bin/rake (LoadError)
from /Users/[name]/.rvm/gems/ruby-2.2.1/bin/rake:23:in `<main>'
from /Users/[name]/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/[name]/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Trying bundle exec rake db:migrate also gives me the same error.
Is there a way I can solve this issue? (I'm on Mac OS X 10.10.5)
EDIT: The first letter of my [name] in the error is upper case even though in my system, it's lower case.
EDIT [PARTIALLY SOLVED]: So I was using Ruby version 2.2.1 and I was supposed to use 2.1.2. Although this did not fix the rake command error, I was trying to run rails server which successfully ran after changing my Ruby version.
If none of the above mentioned comments worked for you, then I suspect you may need to update rake gem. Try:
bundle update rake
See if that fixes the issue. If not, let me know. I will update the answer.
/bin/ruby_executable_hooks.rb error indicates that the error is coming from a Bundler hook. Try to delete the .bundle directory in your project root path and see if the error is gone.
I'm trying to follow the Getting Started with Ruby on Heroku (Microsoft Windows) tutorial.
On the "Run the app locally" step, I am encountering an error when trying to setup the database for the demo app.
C:\jruby-getting-started>jruby -S bin\rake db:create db:migrate
ArgumentProcessor.java:655:in `resolveScript': java.lang.NullPointerException
from ArgumentProcessor.java:613:in `runBinScript'
from ArgumentProcessor.java:303:in `processArgument'
from ArgumentProcessor.java:105:in `processArguments'
from ArgumentProcessor.java:98:in `processArguments'
from RubyInstanceConfig.java:165:in `processArguments'
from Main.java:224:in `run'
from Main.java:197:in `main'
I have followed the tutorial instructions so far, including installing Postgres. Why this error happening? How can I resolve it?
Just repeating what's in the comments so this can be marked as answered.
This error results from using JRuby-9.0.0.0 with the Heroku guide. JRuby-9.0.0.0 is support on Heroku, but the guide has not adopted it yet because JRuby-9k has not had it's GA release yet.
FWIW it looks like this may be fixed in JRuby-9.0.0.0.rc2 :)
when i'm trying to create a new rails project in netbeans. it gives me following error
rake aborted! cannot load such file--
warbler F:/ninto/RubyApplication3/lib/tasks/warbler.rake1:in
'require'F:/ninto/Ruby/RailsApplication3/Rakefile:7:in'<top(required)>'
this occurs when i check the option
Add Rake Targets to Support App Server Deployment(.war)
i'm using netbeans 7.3, rails 3.2.13, ruby 1.9.3p392, windows. Googled through many posts still couldn't find an answer.
thanks
I'm trying to deploy my first app with rails. I'm unable to deploy it, and I'm unhappy because the framework itself allowed me to develop really quickly the application, but I've only two days to make the deployment work :-(
I've installed and configured passenger following a tutorial (i'm using RVM).
When I access the page I have the following error page: traceback here (posted on pastebin to keep this post clear).
What is wrong?
i just uploaded the whole project on the production server, ran bundle install, rake db:create rake db:migrate and rake db:seed. Am I missing some step?
Why it doesn't run?
Developed using Rails 3.2.3 with Ruby 1.9.3.
Please help me to get it running.
Thanks,
Alex.
I have very little information about your problem but I have and idea what is going on. Check your belongs_to association in your event model if there is a class parameter replace it with class_name.