I am going through the installfest process to get started with Ruby on Rails for the odin project, but I'm falling short at the final stage. I've installed everything they asked exactly as instructed, but when I run 'rake db:migrate' i get the message 'The system cannot find the path specified.'
I cant find anything for this on the internet, the solutions I've found all say the target file has the wrong code but when I correct as advised I still get the same message.
I am doing this for a windows system.
C:\Users\Olaoluwa>rails -v
Rails 5.0.2
C:\Users\Olaoluwa>cd c:\Sites
c:\Sites>mkdir railsbridge
A subdirectory or file railsbridge already exists.
c:\Sites>cd railsbridge
c:\Sites\railsbridge>cd test_app
c:\Sites\railsbridge\test_app>rails s
=> Booting Puma
=> Rails 5.0.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 3.7.1 (ruby 2.3.3-p222), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Exiting
Terminate batch job (Y/N)? y
c:\Sites\railsbridge\test_app>rake db:migrate
The system cannot find the path specified.
c:\Sites\railsbridge\test_app>
Edit:
my gemfile.lock shows
GEM
remote: https://rubygems.org/
specs:
codeclimate-test-reporter (0.3.0)
simplecov (>= 0.7.1, < 1.0.0)
diff-lcs (1.2.3)
docile (1.1.3)
multi_json (1.9.0)
rack (1.5.2)
rack-protection (1.5.0)
rack
rake (10.0.4)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
simplecov (0.8.2)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sinatra (1.4.2)
rack (~> 1.5, >= 1.5.2)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.3.7)
PLATFORMS
java
ruby
DEPENDENCIES
codeclimate-test-reporter
rack
rake
rspec
sinatra
If you haven't figured this out yet, it looks like running rails db:migrate should be the way it's done in Rails5 instead of rake db:migrate.
This is based off of this thread:
https://www.reddit.com/r/rails/comments/60gjx3/help_when_using_rake_dbmigrate_i_get_return_error/
If anyone faces the same problem?! This just because the db folder does not has the development sqlite3 file : development.sqlite3 To solve it, go to your app root directory (i.e: Blog, Todo [YOUR APP FOLDER]) then run this command on terminal : rails db:migrate RAILS_ENV=development
The error is simply showing rake db:migrate is not working.
install latest rake gem:-
gem 'rake', '~> 11.2', '>= 11.2.2'
gem install rake -v 11.2.2
and restart the server: rails s
Related
I just upgrade my server to ubuntu 20 LTS, Focal Fossa. Afterwards some stuff did not work as it should. One thing I would like to ask you for help is, that my Rails app is no longer deployable with capistrano. Right before the upgrade it worked.
I just run from remote:
cap staging deploy
Eveything works fine, authentication at github and so on, but at the db:migrate part it fails with the following info:
deploy:migrating
01 ~/.rvm/bin/rvm default do bundle exec rake db:migrate
01 rake aborted!
LoadError: libssl.so.1.0.0: cannot open shared object file: No such file or directory -
/home/prod/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/x86_64-linux/openssl.so
...
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as prod#serverip: Exception while executing as prod#serverip: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
LoadError: libssl.so.1.0.0: cannot open shared object file: No such file or directory - /home/prod/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/x86_64-linux/openssl.so
The file is there and the user prod has all rights to access it. There is only one version of ruby on the server installed by rvm. The latest version of openssl is installed on the server. Postgres is running and contains lists all databases as it should.
here the version list from the gemfile.lock:
capistrano (3.14.1)
airbrussh (>= 1.0.0)
i18n
rake (>= 10.0.0)
sshkit (>= 1.9.0)
capistrano-bundler (2.0.1)
capistrano (~> 3.1)
capistrano-npm (1.0.3)
capistrano (>= 3.0.0)
capistrano-nvm (0.0.7)
capistrano (~> 3.1)
capistrano-rails (1.6.1)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
What can I do, i hope you can help me!
Thanks and best regards,
Stephan
I am trying to run the Rails app 'Simpsons by the Data' (source: https://github.com/toddwschneider/flim-springfield) however whenever I try to run the command bundle exec rake import_data
the following error is returned:
Called from /Users/XXXX/.rvm/gems/ruby-2.3.8/gems/activesupport-4.2.11/lib/active_support/dependencies.rb:240:in 'load_dependency'
rake aborted!
ArgumentError: invalid date
/Users/XXXX/flim-springfield/app/models/episode.rb:52:in 'parse'
I have PostgreSQL 11.1 on MacOS X installed and I have changed the date style from ISO, MDY to ISO DMY as I stupidly thought this would help but it didn't work.
This is my Gem file:
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
bundler (2.0.1, default: 1.17.3)
bundler-unload (1.0.2)
did_you_mean (1.1.0)
executable-hooks (1.6.0)
gem-wrappers (1.4.0)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
net-telnet (0.1.1)
openssl (default: 2.0.2)
pg (1.1.4)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.3.2, 12.3.1, 12.0.0)
rdoc (default: 5.0.0)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
test-unit (3.2.3)
xmlrpc (0.2.1)
Has anyone else run into a problem like this while using this Rails app or could even point me in the right direction? I am completely new to this and as this is the first Rails app that I have ever run, I am not sure how to progress. :(
Any help would be really appreciated!
I was trying to update my ruby 1.9.3 to 2.2.2, and when i test in local that all was working fine, but when i try to push to heroku i got the raindrops issue version and then i update the rain drops by command
bundle update raindrops
but after that when i was checking this Gemfile.lock it shows
GEM
remote: https://rubygems.org/
specs:
raindrops (0.17.0)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
Here the raindrops under the unicorn didn't change, the other one only changed, it push successfully, will it be make any issue for unicorn at any time in production?
Read you Gemfile.lock like this:
GEM
remote: https://rubygems.org/
specs:
raindrops (0.17.0) # <- This is the installed version (0.17.0 is the latest)
unicorn (4.6.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7) # <- This is the version unicorn depends on
You have the latest version of that gem installed (see raindrops page on RubyGems). unicorn itself depends on a raindrops version between 0.7 and < 1.0, the version 0.17.0 fulfills this requirements.
All good!
i have an old rails project here running rails 2.3.8 and ruby 1.8.7 with rvm.
when i'm running rake -T or another rake task it will fail with
I18n::UnknownFileType: can not load translations from /home/project/trunk/vendor/rails/activesupport/lib/active_support/locale/en.yml, the file type yml is not known
running some YAML in the console, will work.
i found some solutions for rails 3 and ruby 1.9.3 (Rails 3: 'The file type yml is not known' when trying to access basic _form.html.erb) and rails 2.3 with ruby 2 (Rails legacy app and Ruby 2 error: can not load translations from the file type yml is not known) but didnt help.
my Gems used in this project:
actionmailer (2.3.18)
actionpack (2.3.18)
activerecord (2.3.18)
activeresource (2.3.18)
activesupport (2.3.18)
afm (0.2.2)
Ascii85 (1.0.2)
bundler-unload (1.0.2)
color (1.8)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
hashery (2.1.1)
iconv (1.0.4)
little-plugger (1.1.4)
logging (2.0.0, 1.8.2)
multi_json (1.11.2)
mysql (2.9.1)
pdf-core (0.6.0)
pdf-reader (1.3.3)
pdf-writer (1.1.8)
prawn (2.0.2, 0.12.0)
rack (1.1.6)
rails (2.3.18)
rake (10.4.2, 10.1.1)
ruby-rc4 (0.1.5)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
transaction-simple (1.4.0.2)
ttfunk (1.4.0, 1.0.3)
script/console and script/server running fine.
i have to use ruby 1.8.7 and cannot update. upgrade to rails 3 is'nt possible in month's :)
do you have some idea's to get the rake tasks running?
best
robert
i found the solution:
there was several problems:
rake (10.4.2, 10.1.1) now just using rake 10.1.1
logging (2.0.0, 1.8.2) now just using logging 1.8.2
(after testing) had to replace rdoctask with task in Rakefile
now rake -T works fine
OK, so I'm doing the following Ruby tutorial: https://github.com/alexch/learn_ruby
and I have saved all the files under c:/learn_ruby
When I run rake in the directory: "00_hello" I get the following error:
c:\learn_ruby\00_hello>rake
(in c:/learn_ruby)
rake aborted!
Could not find 'rspec' (~> 2) - did find: [rspec-3.0.0]
Checked in 'GEM_PATH=C:/Users/******/.gem/ruby/1.9.1;C:/Ruby193/lib/ruby/gems/1
.9.1', execute `gem env` for more information
my current gem list is:
bigdecimal (1.1.0)
diff-lcs (1.2.5)
io-console (0.3)
json (1.5.5)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
rspec (3.0.0)
rspec-core (3.0.2)
rspec-expectations (3.0.2)
rspec-mocks (3.0.2)
rspec-support (3.0.2)
rubygems-update (2.3.0)
I am new at Ruby, so can someone please help a noob out? I tried installing rspec 2.0.0, but got a different error.
The error message
Could not find 'rspec' (~> 2)
means that it is looking for rspec in the 2.x range. Usually this means you have a Gemfile which specifies gem 'rspec', '~> 2'. The ~> ties it to the same version "family"; see the bundler docs for more information.
Usually the solution is to type
bundle install
which will make sure your prerequisites are met.